From bbb9d134d3d05f056627dd372f67287582feb713 Mon Sep 17 00:00:00 2001 From: AdventurousSwine Date: Sun, 16 Oct 2022 17:19:31 -0400 Subject: [PATCH 1/3] fun.py --- src/fullyautomatednutcracker/cogs/fun.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/fullyautomatednutcracker/cogs/fun.py b/src/fullyautomatednutcracker/cogs/fun.py index b63d990..2e3e4f7 100644 --- a/src/fullyautomatednutcracker/cogs/fun.py +++ b/src/fullyautomatednutcracker/cogs/fun.py @@ -22,6 +22,12 @@ def __init__(self, bot): self.bot.reddit = apraw.Reddit(username=username, password=password, client_secret=client_secret, client_id=client_id) self.aww_submissions = [] self.bot.good = [224323277370294275, 448250281097035777, 562642634686988289, 368880176970596352] + self.channels = [742559349750235136, 560663594849533962, 476812281984974870] # put IDs here + self.words = ["Nut"] # put others here if you want different versions + self.words = ["https://th.bing.com/th/id/OIP.2AsVVWJSmzZb0mt88jSD2AHaHa?pid=ImgDet&rs=1"] + self.minute_bounds = (1 * 60, 432000) # 10s to 60s, change this (1m - 1h) + self.loop = bot.loop.create_task(self.random_nut()) + self.stop = False async def get_submission(self, subreddit): if len(self.aww_submissions) == 0: @@ -130,6 +136,16 @@ async def swine(ctx): """Swine""" await ctx.send("https://tenor.com/view/fuck-not-swine-walking-back-gif-11560149") + async def random_nut(self): + await asyncio.sleep(5) + while not self.stop: + try: + channel = self.bot.get_channel(random.choice(self.channels)) + await channel.send(random.choice(self.words)) + except: + pass + await asyncio.sleep(random.randint(self.minute_bounds[0], self.minute_bounds[1])) + def setup(bot): bot.add_cog(Fun(bot)) From c5fc289eb6a1faf2e83a5598f2347abef6ecd5aa Mon Sep 17 00:00:00 2001 From: AdventurousSwine Date: Sun, 16 Oct 2022 17:26:34 -0400 Subject: [PATCH 2/3] fun.py --- src/fullyautomatednutcracker/cogs/fun.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fullyautomatednutcracker/cogs/fun.py b/src/fullyautomatednutcracker/cogs/fun.py index 2e3e4f7..b76dbe7 100644 --- a/src/fullyautomatednutcracker/cogs/fun.py +++ b/src/fullyautomatednutcracker/cogs/fun.py @@ -23,8 +23,7 @@ def __init__(self, bot): self.aww_submissions = [] self.bot.good = [224323277370294275, 448250281097035777, 562642634686988289, 368880176970596352] self.channels = [742559349750235136, 560663594849533962, 476812281984974870] # put IDs here - self.words = ["Nut"] # put others here if you want different versions - self.words = ["https://th.bing.com/th/id/OIP.2AsVVWJSmzZb0mt88jSD2AHaHa?pid=ImgDet&rs=1"] + self.words = ["Nut https://th.bing.com/th/id/OIP.2AsVVWJSmzZb0mt88jSD2AHaHa?pid=ImgDet&rs=1"] # put others here if you want different versions self.minute_bounds = (1 * 60, 432000) # 10s to 60s, change this (1m - 1h) self.loop = bot.loop.create_task(self.random_nut()) self.stop = False From 6535226b6eb762502fbf1b15e05add4cb59cecd8 Mon Sep 17 00:00:00 2001 From: AdventurousSwine Date: Sun, 16 Oct 2022 17:41:36 -0400 Subject: [PATCH 3/3] fun.py --- src/fullyautomatednutcracker/cogs/fun.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fullyautomatednutcracker/cogs/fun.py b/src/fullyautomatednutcracker/cogs/fun.py index b76dbe7..9b2c69f 100644 --- a/src/fullyautomatednutcracker/cogs/fun.py +++ b/src/fullyautomatednutcracker/cogs/fun.py @@ -135,6 +135,11 @@ async def swine(ctx): """Swine""" await ctx.send("https://tenor.com/view/fuck-not-swine-walking-back-gif-11560149") + @commands.command() + async def rage(self, ctx): + """Rage""" + await ctx.send("https://tenor.com/view/rage-mad-angry-kid-tantrums-gif-17338734") + async def random_nut(self): await asyncio.sleep(5) while not self.stop: