Added the option to !opt-in/opt-out [onlinebot only]

Fixed command & event threading
Events are now threaded by event_type (i.e. all buddy_logon events get ran in the same one)
Added default preferences
Fixed recipe loading for multiple installs (i.e. on different machines)
This commit is contained in:
2021-08-27 13:58:47 +02:00
parent d0c8c1744c
commit c04f76c0db
24 changed files with 258 additions and 122 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ class QuoteController:
"created_at INT NOT NULL, "
"content VARCHAR(4096) NOT NULL)")
@command(command="quote", params=[], access_level="all",
@command(command="quote", params=[], access_level="member",
description="Show a random quote")
def quote_command(self, request):
quote = self.get_quote_info()
@@ -30,7 +30,7 @@ class QuoteController:
else:
return "There are no quotes to display."
@command(command="quote", params=[Int("quote_id")], access_level="all",
@command(command="quote", params=[Int("quote_id")], access_level="member",
description="Show a specific quote")
def quote_view_command(self, _, quote_id):
quote = self.get_quote_info(quote_id)
@@ -40,7 +40,7 @@ class QuoteController:
else:
return f"Could not find quote with ID <highlight>{quote_id:d}</highlight>."
@command(command="quote", params=[Const("add"), Any("quote")], access_level="all",
@command(command="quote", params=[Const("add"), Any("quote")], access_level="member",
description="Show a specific quote")
def quote_add_command(self, request, _, quote):
if len(quote) > 4096: