aboutsummaryrefslogtreecommitdiff
path: root/cogs/src.py
diff options
context:
space:
mode:
authorAnInternetTroll <lucafulger@gmail.com>2020-06-27 15:55:55 +0000
committerAnInternetTroll <lucafulger@gmail.com>2020-06-27 15:55:55 +0000
commit6c6daffcffaa7289deff2a97b49c894486d8127c (patch)
treeb4970a33eff97b1482b6c6d62c0b747a99176b10 /cogs/src.py
parent5315ed9981aed873632e0c425aee27fc309eb03e (diff)
parenta95aa4d46bf7850c21a8fba94eca3ae9ee21d7c8 (diff)
downloadsteve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.tar
steve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.tar.gz
steve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.tar.bz2
steve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.tar.lz
steve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.tar.xz
steve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.tar.zst
steve-bot-6c6daffcffaa7289deff2a97b49c894486d8127c.zip
Merge branch 'master' of https://github.com/AnInternetTroll/mcbeDiscordBot
Diffstat (limited to 'cogs/src.py')
-rwxr-xr-xcogs/src.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/cogs/src.py b/cogs/src.py
index ff31cfb..df40678 100755
--- a/cogs/src.py
+++ b/cogs/src.py
@@ -63,11 +63,6 @@ async def deleteRun(self, apiKey, ctx, run):
await ctx.send("Something went wrong")
await ctx.message.author.send(f"```json\n{json.dumps(json.loads(r.text),indent=4)}```")
-async def clear(self):
- async for msg in self.bot.get_channel(699713639866957905).history():
- await msg.delete()
-
-
async def pendingRuns(self, ctx):
mcbe_runs = 0
mcbeil_runs = 0
@@ -124,11 +119,11 @@ async def pendingRuns(self, ctx):
mcbece_runs += 1
embed = discord.Embed(
title=leaderboard, url=link, description=f"{categoryName} in `{str(rta).replace('000','')}` by **{player}**", color=16711680+i*60, timestamp=timestamp)
- await self.bot.get_channel(699713639866957905).send(embed=embed)
+ await self.bot.get_channel(self.bot.config[str(ctx.message.guild.id)]["pending_channel"]).send(embed=embed)
runs = runs2
gameID = gameID2
embed_stats = discord.Embed(title='Pending Run Stats', description=f"Full Game Runs: {mcbe_runs}\nIndividual Level Runs: {mcbeil_runs}\nCategory Extension Runs: {mcbece_runs}", color=16711680 + i * 60)
- await self.bot.get_channel(699713639866957905).send(embed=embed_stats)
+ await self.bot.get_channel(self.bot.config[str(ctx.message.guild.id)]["pending_channel"]).send(embed=embed_stats)
async def verifyNew(self, apiKey=None, userID=None):
@@ -176,7 +171,7 @@ async def verifyNew(self, apiKey=None, userID=None):
wrCounter = False
runnerCounter = False
-
+
for i in pbs["data"]:
if i["place"] == 1:
if i["run"]["game"] == "yd4ovvg1" or i["run"]["game"] == "v1po7r76":
@@ -208,7 +203,7 @@ class Src(commands.Cog):
@commands.guild_only()
async def pending(self, ctx):
async with ctx.typing():
- await self.bot.get_channel(699713639866957905).purge(limit=500)
+ await self.bot.get_channel(self.bot.config[str(ctx.message.guild.id)]["pending_channel"]).purge(limit=500)
await pendingRuns(self, ctx)
@commands.command(description="Reject runs quickly")