From b889beaa39fb60adb81c422fc9ccc30b3ebd8293 Mon Sep 17 00:00:00 2001 From: AnInternetTroll Date: Thu, 11 Jun 2020 21:22:49 +0200 Subject: minor fixes and !serverinfo --- .gitignore | 0 .vscode/settings.json | 0 bot.py | 0 cogs/admin.py | 0 cogs/general.py | 38 ++++++++++++++++++++++++++++++++++---- cogs/help.py | 0 cogs/logs.py | 6 +++++- cogs/player.py | 0 cogs/src.py | 0 cogs/trans.py | 0 cogs/utils.py | 10 +++++----- custom_commands.json | 6 +++--- main.py | 0 palette.png | Bin 14 files changed, 47 insertions(+), 13 deletions(-) mode change 100755 => 100644 .gitignore mode change 100755 => 100644 .vscode/settings.json mode change 100755 => 100644 bot.py mode change 100755 => 100644 cogs/admin.py mode change 100755 => 100644 cogs/general.py mode change 100755 => 100644 cogs/help.py mode change 100755 => 100644 cogs/logs.py mode change 100755 => 100644 cogs/player.py mode change 100755 => 100644 cogs/src.py mode change 100755 => 100644 cogs/trans.py mode change 100755 => 100644 cogs/utils.py mode change 100755 => 100644 custom_commands.json mode change 100755 => 100644 main.py mode change 100755 => 100644 palette.png diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/.vscode/settings.json b/.vscode/settings.json old mode 100755 new mode 100644 diff --git a/bot.py b/bot.py old mode 100755 new mode 100644 diff --git a/cogs/admin.py b/cogs/admin.py old mode 100755 new mode 100644 diff --git a/cogs/general.py b/cogs/general.py old mode 100755 new mode 100644 index ff60bb7..ccc4b28 --- a/cogs/general.py +++ b/cogs/general.py @@ -20,8 +20,6 @@ class General(commands.Cog): if not user: user = ctx.message.author - elif type(user)=="str": - user = self.bot.get_user(int(user)) # Very very shit """ @@ -38,8 +36,12 @@ class General(commands.Cog): for i in user.roles: output += i.mention + if user.color.value == 0: + color = 16777210 + else: + color = user.color - embed=discord.Embed(title=user.name, description=user.mention, color=user.color, timestamp=ctx.message.created_at) + 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") @@ -54,7 +56,7 @@ class General(commands.Cog): #os.remove("temp.png") @commands.command() - async def coop(self, ctx, user: discord.Member=None): + async def coop(self, ctx, *, user: discord.Member=None): if not user: user = ctx.message.author elif type(user)=="str": @@ -69,5 +71,33 @@ class General(commands.Cog): await user.add_roles(coop_role) await ctx.send("You are now in the coop gang") + @commands.command() + async def serverinfo(self, ctx, guild=None): + if not guild: + guild = ctx.message.guild + else: + print(type(guild)) + guild = self.bot.get_guild(int(guild)) + + if guild.owner.color.value == 0: + color = 16777210 + else: + color = guild.owner.color + + emojiList = " " + for i in guild.emojis: + 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.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) + embed.add_field(name="Owner", value=guild.owner.mention, inline=True) + embed.set_footer(text=f"ID: {guild.id}") + await ctx.send(embed=embed) + def setup(bot): bot.add_cog(General(bot)) diff --git a/cogs/help.py b/cogs/help.py old mode 100755 new mode 100644 diff --git a/cogs/logs.py b/cogs/logs.py old mode 100755 new mode 100644 index ea3870a..c6f18b5 --- a/cogs/logs.py +++ b/cogs/logs.py @@ -10,10 +10,14 @@ class Logs(commands.Cog): async def on_message_delete(self, message): if message.guild.id != 574267523869179904: return + if message.author.color.value == 0: + color = 16777210 + else: + color = message.author.color channel = self.bot.get_channel(718187032869994686) embed = discord.Embed( title='Deleted Message', - color=message.author.color, + color=message, timestamp=message.created_at ) embed.add_field( diff --git a/cogs/player.py b/cogs/player.py old mode 100755 new mode 100644 diff --git a/cogs/src.py b/cogs/src.py old mode 100755 new mode 100644 diff --git a/cogs/trans.py b/cogs/trans.py old mode 100755 new mode 100644 diff --git a/cogs/utils.py b/cogs/utils.py old mode 100755 new mode 100644 index 5492c14..c708e54 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -67,8 +67,8 @@ class Utils(commands.Cog): randomness = randint(1, 10) if randomness <= 1: totalEyes += 1 - - await ctx.send(f"{ctx.message.author.display_name} -> your seed is a {totalEyes} eye") + discname = ctx.message.author.name.replace("@", "@ ") + await ctx.send(f"{discname} -> your seed is a {totalEyes} eye") @findseed.error async def findseed_handler(self,ctx,error): @@ -98,11 +98,11 @@ class Utils(commands.Cog): "waaakeee uuuppp!", "are they dead or asleep? I can't tell.", "wake up, muffin head", - "psst... coffeeee \:D" + "psst... coffeeee \\:D" ] # Set up initial message - msg = f"{ctx.message.author.display_name} -> " + msg = f"{ctx.message.author.name} -> " # Optional TODO: Create non-normal distribution sleepHrs = randint(0, 24) @@ -115,7 +115,7 @@ class Utils(commands.Cog): # Add extra comment based on number of sleepHrs if sleepHrs == 0: - msg += "- nice try \:D" + msg += "- nice try \\:D" elif sleepHrs <= 5: msg += f"- {lessSleepMsg[randint(0, len(lessSleepMsg) - 1)]}" elif sleepHrs >= 10: diff --git a/custom_commands.json b/custom_commands.json old mode 100755 new mode 100644 index c87825f..6ed04ce --- a/custom_commands.json +++ b/custom_commands.json @@ -20,7 +20,6 @@ "/swipe": "not an alt", "!HereWeGo": "10 in a Row!", "/Make": "Troll Supermod", - "!h": "<@!199070670221475842> no swearing in this christian discord server", "/boards": "https://www.speedrun.com/mcbe", "/ban": "shut up", "/pending": "this annoys me", @@ -30,8 +29,9 @@ "!lenny": "( \u0361\u00b0 \u035c\u0296 \u0361\u00b0)", "!hwg": "10 iar", "!GlasgowRangers": "You Let Your Club Die!", - "!murray": "the irishest of the Irish", "!e\ud83c\udd71\ufe0fic": "HEY GUYS ITS SHIGAME45", "!testy": "test", - "!toxicitypass": "```TOXICITY PASS\n\nTHE HOLDER OF THIS PASS HAS PERMISSION FROM THE HEAVENS ABOVE TO DO AND SAY WHATEVER THE HELL THEY WANT\nTHEY ARE ALLOWED TO BE AS TOXIC AS THEY WILL WITHOUT REPERCUSSIONS\n\nPASS OWNER: Duck W aka Weexy aka Indy Kambeitz```" + "!toxicitypass": "```TOXICITY PASS\n\nTHE HOLDER OF THIS PASS HAS PERMISSION FROM THE HEAVENS ABOVE TO DO AND SAY WHATEVER THE HELL THEY WANT\nTHEY ARE ALLOWED TO BE AS TOXIC AS THEY WILL WITHOUT REPERCUSSIONS\n\nPASS OWNER: Duck W aka Weexy aka Indy Kambeitz```", + "!welcome": "Welcome! <:mango:715738087627685908>", + "!learntoread": "When two players are tied on the leaderboards **ONLY ONE FUCKER WILL BE VISIBLE**" } \ No newline at end of file diff --git a/main.py b/main.py old mode 100755 new mode 100644 diff --git a/palette.png b/palette.png old mode 100755 new mode 100644 -- cgit v1.2.3