Skip to content

Commit 4af5d71

Browse files
committed
Fixing dependencies on newer version of discord.py and dockerizing
1 parent 48ec027 commit 4af5d71

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
cubes/*
1+
cubes/json-*
2+
cubes/raw-*
23
*.swp
34
__pycache__/
45
pip-selfcheck.json

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM python:3.6.8-stretch
33
ADD cubebot.py /
44
ADD requirements.txt /
55
ADD functions /functions/
6+
ADD cubes cubes/
67

78
RUN pip install -r requirements.txt
89

cubebot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#Initializing bot
1414
description = '''CubeBot Commands'''
15-
bot = commands.Bot(command_prefix='-', description=description, pm_help=True)
15+
bot = commands.Bot(command_prefix='$', description=description, help_command=commands.DefaultHelpCommand(dm_help=True))
1616

1717
@bot.event
1818
async def on_ready():

cubes/.gitkeep

Whitespace-only changes.

functions/rotisserie.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def updateServer(bot, ctx):
5454
await saveCubes()
5555
try:
5656
#Find the original message and server to update
57-
origMessage = await channel.get_message(cube["message"])
57+
origMessage = await channel.fetch_message(cube["message"])
5858
await origMessage.edit(embed=embed)
5959
except Exception as e:
6060
logger.info(e)
@@ -194,6 +194,7 @@ async def pick(self, ctx, *, card):
194194
lastPlayer = True
195195
cube["players"].reverse()
196196
await updateServer(self.bot, ctx)
197+
await ctx.message.delete()
197198
stopDrafting = False
198199
for player in cube["players"]:
199200
if len(player["picks"]) == 2:
@@ -220,7 +221,6 @@ async def pick(self, ctx, *, card):
220221
cubeObjects.remove(cube)
221222
os.remove("./cubes/json-"+str(ctx.channel.id))
222223
await updateServer(self.bot, ctx)
223-
return
224224
await ctx.channel.edit(topic="No drafts active. ", reason="Draft completed.")
225225
await ctx.send("Drafting is completed! All choices are final and locked.")
226226
await ctx.message.delete()

0 commit comments

Comments
 (0)