mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
class
This commit is contained in:
parent
92ecaa526a
commit
64618ac960
@ -91,19 +91,7 @@ def bot_events_startup_check(bot):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def botevents(name):
|
class botevents(object):
|
||||||
if hasattr(boteventsclass, name):
|
|
||||||
return boteventsclass.__getattribute__(name)
|
|
||||||
else:
|
|
||||||
eventnumber = 0
|
|
||||||
while eventnumber not in boteventsclass.usednumbers:
|
|
||||||
eventnumber = randint(2000, 9999)
|
|
||||||
exec("self." + str(name).upper() + " = " + str(eventnumber))
|
|
||||||
boteventsclass.usednumbers.append(str(eventnumber))
|
|
||||||
return eventnumber
|
|
||||||
|
|
||||||
|
|
||||||
class boteventsclass(object):
|
|
||||||
"""An dynamic listing of all the notable Bot numeric events.
|
"""An dynamic listing of all the notable Bot numeric events.
|
||||||
|
|
||||||
Events contained in this module will utilize the 1000-range
|
Events contained in this module will utilize the 1000-range
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user