From f68961ffdbcdcfed214bc80c8c31c93bf5dbd8cc Mon Sep 17 00:00:00 2001 From: Thomas Voss <57815710+Mango0x45@users.noreply.github.com> Date: Fri, 29 May 2020 18:08:25 +0200 Subject: uuuuh dont question it --- cogs/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cogs/utils.py b/cogs/utils.py index 950455a..07c65f4 100644 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -166,6 +166,11 @@ class Utils(commands.Cog): img.save("leaderboard.png", "PNG") await ctx.send(file=discord.File("leaderboard.png")) + + # Why? Because I can. lel + @commands.command() + async def someone(self): + await random.choice(server.members).mention def setup(bot): bot.add_cog(Utils(bot)) -- cgit v1.2.3 From 73ff29ea229903ce2fdfa7f8cf2760b3fc7dc226 Mon Sep 17 00:00:00 2001 From: Thomas Voss <57815710+Mango0x45@users.noreply.github.com> Date: Fri, 29 May 2020 18:24:06 +0200 Subject: fixed it! --- cogs/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cogs/utils.py b/cogs/utils.py index 07c65f4..09a7284 100644 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -5,6 +5,9 @@ import requests import json import asyncio import datetime +# forgot to import this and ended up looking mentally unstable +# troll literally pointed out atleast 4 things I did wrong in 3 lines of code +from random import choice from random import randint from datetime import timedelta from selenium import webdriver @@ -169,8 +172,8 @@ class Utils(commands.Cog): # Why? Because I can. lel @commands.command() - async def someone(self): - await random.choice(server.members).mention + async def someone(self, ctx): + await ctx.send(choice(ctx.guild.members).mention) def setup(bot): bot.add_cog(Utils(bot)) -- cgit v1.2.3 From 70c35601b438d9de10b3d52cd606341c3e071561 Mon Sep 17 00:00:00 2001 From: Thomas Voss <57815710+Mango0x45@users.noreply.github.com> Date: Fri, 29 May 2020 18:27:52 +0200 Subject: added a fun story for people to read --- cogs/utils.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/cogs/utils.py b/cogs/utils.py index 09a7284..f1cfeba 100644 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -171,6 +171,52 @@ class Utils(commands.Cog): await ctx.send(file=discord.File("leaderboard.png")) # Why? Because I can. lel + + # celeste guyToday at 6:13 PM + # @Mango Man that's not how it works + + # Mango ManToday at 6:13 PM + # it looks fine in lightmode + # wait whats not how what works + + # celeste guyToday at 6:13 PM + # the command + + # Mango ManToday at 6:13 PM + # o + # how does it work + + # celeste guyToday at 6:14 PM + # Like for a start, nothing is defined + # use ctx D: + + # Mango ManToday at 6:14 PM + # Do I need to though? + + # celeste guyToday at 6:14 PM + # ctx.guild.members() or something + # Yes, server is not a thing + # 2nd, mention is not used like that + # You still have to send a message + # And mention in the message + + # Mango ManToday at 6:14 PM + # o + + # celeste guyToday at 6:15 PM + # 3rd, don't forget to import choice from random + + # Mango ManToday at 6:15 PM + # this is why you dont steal code from github + # I actually feel embarrased over forgetting to import random + + # celeste guyToday at 6:15 PM + # 4th, add ctx in the arguments list, or you'll get an error like "function takes 1 argument but 2 were given" + # And you will use it to send the message and get the server + # Also forgetting the import is the least embarrassing thing + # Since I did remove it + # And replaced with import randint from random + @commands.command() async def someone(self, ctx): await ctx.send(choice(ctx.guild.members).mention) -- cgit v1.2.3