diff --git a/Dockerfile b/Dockerfile index 951f2b9..d39e5e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6-alpine +FROM python:3.10.7-alpine WORKDIR /app diff --git a/README.md b/README.md index 4305a2e..06c809b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ GVRDGrunt is a simple bot that performs boilerplate admin tasks for Vancouver/GV Installation ------------ +First, you must set up a Discord bot through the developer portal. These instructions +seem to often change, so we won't recapitulate any of them here; see the "Applications" +tab in the developer portal when you're logged in to create a new app (bot). + +The bot must have "Message content intent" enabled in order for commands to work with the +usual "." prefix. (Without this, commands seem to work if you mention the bot, but +without it, the bot cannot access the contents of messages sent by other users at all.) + * Install Python 3.6 or later * On OS X, you may need to do the following https://github.com/Rapptz/discord.py/issues/423#issuecomment-272093801 * Set up a Virtualenv if you're using this in production diff --git a/bot/__main__.py b/bot/__main__.py index 8e8d594..cfdf28d 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -61,13 +61,15 @@ def main(): with open(args.config, "rb") as f: settings = json.load(f) - loop = asyncio.get_event_loop() + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) gvrd_grunt = BadBot( command_prefix=commands.when_mentioned_or(settings["command_prefix"]), + case_insensitive=True, description="A grunt worker for the GVRD servers' needs", loop=loop, - intents=intents + intents=intents, ) ex_db = EXGateDB(settings["sqlite_db"]) diff --git a/bot/raid_fyi_cog.py b/bot/raid_fyi_cog.py index 779ce4f..65f851e 100644 --- a/bot/raid_fyi_cog.py +++ b/bot/raid_fyi_cog.py @@ -483,12 +483,9 @@ def strip_fyi_message_content(self, message): ) RELAY_MESSAGE_NONE_INTERESTED_YET = "(none so far)" - FYI_ALIASES = ["FYI", "Fyi"] - @command( help="Post an FYI to the corresponding FYI channel.", rest_is_raw=True, - aliases=FYI_ALIASES ) async def fyi(self, ctx): """ @@ -1060,16 +1057,7 @@ async def cleanup_fc_messages( @command( help="Associate a friend code with your Discord account.", - aliases=( - "setfc", - "set_fc", - "Setfc", - "SETFC", - "setFC", - "setFc", - "SetFC", - "SetFc", - ) + aliases=("setfc", "set_fc"), ) async def set_friend_code(self, ctx, *, friend_code): """ @@ -1135,19 +1123,7 @@ async def friend_code_error(self, ctx, error): "deletefc", "delete_fc", "delete_friend_code", - "Unsetfc", - "UNSETFC", - "unsetFC", - "unsetFc", - "UnsetFC", - "UnsetFc", - "Deletefc", - "DELETEFC", - "deleteFC", - "deleteFc", - "DeleteFC", - "DeleteFc", - ) + ), ) async def unset_friend_code(self, ctx): """ @@ -1181,13 +1157,7 @@ async def unset_friend_code(self, ctx): aliases=( "getfc", "get_fc", - "Getfc", - "GETFC", - "getFC", - "getFc", - "GetFC", - "GetFc", - ) + ), ) async def get_friend_code(self, ctx): """ diff --git a/bot/verification_cog.py b/bot/verification_cog.py index acf5c97..6105154 100644 --- a/bot/verification_cog.py +++ b/bot/verification_cog.py @@ -341,10 +341,8 @@ async def showsettings(self, ctx): :param ctx: :return: """ - print("FOOOOOOOO I got here") self.can_configure_bot_validator(ctx) self.guild_registered_validator(ctx.guild) - print("FOOOOOOOO I got here too") guild_info = self.db.get_verification_info(ctx.guild) diff --git a/requirements.txt b/requirements.txt index 35a1822..db1a27b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -yarl == 1.1.1 # seems to break otherwise -multidict == 4.5.2 # subsequent versions break as of Nov 23, 2019 +# yarl == 1.1.1 # seems to break otherwise +# multidict == 4.5.2 # subsequent versions break as of Nov 23, 2019 discord.py == 1.6.0 pyparsing awscli