英文:
I'm trying to create a ticket system using JDA (Discord development); Trouble with variables
问题
所以,我有多个公共变量,但如果一个人有多个工单处于打开状态,这些变量会在工单之间共享,因为它是相同的脚本,这会导致程序出现故障,因为变量需要在工单创建时进行重置。我在思考是否可以使用对象,但我对如何实现毫无头绪。这是我的代码链接:https://paste.myst.rs/dj7
英文:
So, I have multiple public variables, but if one has multiple tickets open, the variables are shared between tickets, since it is the same script, which breaks the program since variables need to be reset at ticket creation. I was thinking if I could use objects, but I haven't the faintest idea how to implement that. Here's my code: https://paste.myst.rs/dj7
专注分享java语言的经验与见解,让所有开发者获益!
评论