Skip to content

Commit

Permalink
Closes #54, #56, and #57.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhliang committed Oct 11, 2022
1 parent b1eef96 commit ae2e768
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6-alpine
FROM python:3.10.7-alpine

WORKDIR /app

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
36 changes: 3 additions & 33 deletions bot/raid_fyi_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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):
"""
Expand Down
2 changes: 0 additions & 2 deletions bot/verification_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ae2e768

Please sign in to comment.