aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bot.py1
-rw-r--r--cogs/admin.py2
-rw-r--r--cogs/general.py23
-rw-r--r--cogs/logs.py5
-rw-r--r--cogs/src.py3
5 files changed, 13 insertions, 21 deletions
diff --git a/bot.py b/bot.py
index 2721110..ccd8d22 100644
--- a/bot.py
+++ b/bot.py
@@ -36,6 +36,7 @@ class BedrockBot(commands.Bot):
def __init__(self):
super().__init__(command_prefix=get_prefix, case_insensitive=True)
self.logger = logging.getLogger('discord')
+ self.messageBlacklist = []
with open('custom_commands.json', 'r') as f:
self.custom_commands = json.load(f)
diff --git a/cogs/admin.py b/cogs/admin.py
index 3cb7ff8..d722390 100644
--- a/cogs/admin.py
+++ b/cogs/admin.py
@@ -24,7 +24,7 @@ class Admin(commands.Cog):
@commands.check(is_mod)
async def forceexit(self, ctx, password):
if password == "abort":
- ctx.message.delete()
+ await ctx.message.delete()
exit()
@commands.command()
diff --git a/cogs/general.py b/cogs/general.py
index ccc4b28..2e25410 100644
--- a/cogs/general.py
+++ b/cogs/general.py
@@ -21,20 +21,9 @@ class General(commands.Cog):
if not user:
user = ctx.message.author
- # Very very shit
- """
- await ctx.send(str(user.avatar_url))
- request.urlretrieve(str(user.avatar_url), "temp.webp")
- #filename = wget.download(user.avatar_url, out="temp.webp")
- image = Image.open("temp.webp").convert("RGB")
- image.save("temp.png", "PNG")
-
- f = discord.File("temp.png", filename="temp.png")
- #await messagable.send(file=f, embed=e)
- """
output = ""
for i in user.roles:
- output += i.mention
+ output += i.mention + " "
if user.color.value == 0:
color = 16777210
@@ -43,8 +32,7 @@ class General(commands.Cog):
embed=discord.Embed(title=user.name, description=user.mention, color=color, timestamp=ctx.message.created_at)
#embed.set_thumbnail(url="attachment://temp.webp")
- embed.set_thumbnail(url=user.avatar_url)
- embed.set_image(url="attachment://temp.png")
+ embed.set_thumbnail(url=user.avatar_url_as(format="png"))
embed.add_field(name="Nickname", value=user.display_name, inline=False)
embed.add_field(name="Joined on", value=user.joined_at.date(), inline=True)
embed.add_field(name="Status", value=user.status, inline=True)
@@ -59,7 +47,7 @@ class General(commands.Cog):
async def coop(self, ctx, *, user: discord.Member=None):
if not user:
user = ctx.message.author
- elif type(user)=="str":
+ else:
user = self.bot.get_user(int(user))
coop_role = ctx.guild.get_role(694261282861219952)
@@ -89,9 +77,8 @@ class General(commands.Cog):
emojiList += str(i) + " "
embed=discord.Embed(title=guild.name, description=guild.description, color=color, timestamp=ctx.message.created_at)
- #embed.set_thumbnail(url="attachment://temp.webp")
- embed.set_thumbnail(url=guild.icon_url)
- embed.set_image(url=guild.splash_url)
+ embed.set_thumbnail(url=guild.icon_url_as(format="png"))
+ embed.set_image(url=guild.splash_url_as(format="png"))
embed.add_field(name="Created on", value=guild.created_at.date(), inline=True)
embed.add_field(name="Members", value=guild.member_count, inline=True)
embed.add_field(name="Emojis", value=emojiList, inline=True)
diff --git a/cogs/logs.py b/cogs/logs.py
index c6f18b5..d6889eb 100644
--- a/cogs/logs.py
+++ b/cogs/logs.py
@@ -8,6 +8,9 @@ class Logs(commands.Cog):
@commands.Cog.listener()
async def on_message_delete(self, message):
+ if (message.id in self.bot.messageBlacklist):
+ self.bot.messageBlacklist.remove(message.id)
+ return
if message.guild.id != 574267523869179904:
return
if message.author.color.value == 0:
@@ -17,7 +20,7 @@ class Logs(commands.Cog):
channel = self.bot.get_channel(718187032869994686)
embed = discord.Embed(
title='Deleted Message',
- color=message,
+ color=color,
timestamp=message.created_at
)
embed.add_field(
diff --git a/cogs/src.py b/cogs/src.py
index 96bf53c..f0619d4 100644
--- a/cogs/src.py
+++ b/cogs/src.py
@@ -208,7 +208,7 @@ class Src(commands.Cog):
@commands.guild_only()
async def pending(self, ctx):
async with ctx.typing():
- await clear(self)
+ await self.bot.get_channel(699713639866957905).purge()
await pendingRuns(self, ctx)
@commands.command(description="Reject runs quickly")
@@ -231,6 +231,7 @@ class Src(commands.Cog):
@commands.command()
async def verify(self, ctx, apiKey=None, userID=None):
+ self.bot.messageBlacklist.append(ctx.message.id)
#if apiKey == None:
# await ctx.send(f"Please try again this command by getting an apiKey from https://www.speedrun.com/api/auth then do `{ctx.prefix}verify <apiKey>` in my DMs or anywhere in this server. \nBe careful who you share this key with. To learn more check out https://github.com/speedruncomorg/api/blob/master/authentication.md")
# return