Prechádzať zdrojové kódy

Add alias choose -> choice, add slash as bang for groupme

Kirk Trombley 3 rokov pred
rodič
commit
d35d79af9e

+ 1 - 0
commands/commands/__init__.py

@@ -37,6 +37,7 @@ config = get_command_config().extend(
             "hg": "hangguy",
             "cookie": "fortune",
             "wl": "watchlist",
+            "choose": "choice",
         },
     )
 )

+ 2 - 2
drivers/groupme_driver.py

@@ -45,7 +45,7 @@ class GroupMeMessage(BaseModel):
 
 class GroupMeBot(rollbot.Rollbot[GroupMeMessage]):
     def __init__(self):
-        super().__init__(config.extend(rollbot.CommandConfiguration(bangs=("!",))), database_file)
+        super().__init__(config.extend(rollbot.CommandConfiguration(bangs=("!","/",))), database_file)
 
     def read_config(self, key: str) -> Any:
         cfg = secrets
@@ -91,7 +91,7 @@ class GroupMeBot(rollbot.Rollbot[GroupMeMessage]):
             message_id=msg.id,
         )
 
-    async def upload_image(self, data: bytes) -> (str, str):
+    async def upload_image(self, data: bytes) -> tuple[str, str]:
         try:
             return await self.upload_image_groupme(data), ""
         except: