From a8ed81e54740da5c4a8ee479e7f6db2b3837bb88 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Fri, 2 Jun 2023 20:11:04 +0530 Subject: [PATCH 01/16] fixed token command --- cogs/fun.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index 1e859da..079f4c5 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -5,6 +5,7 @@ from textwrap import wrap from typing import TYPE_CHECKING, Optional +import base64 import discord from discord.ext import commands from ext.helpers import create_trash_meme, get_rock @@ -127,12 +128,15 @@ async def eightball(self, ctx: commands.Context[CodingBot], *, question: str): @commands.hybrid_command(name="token") async def token(self, ctx: commands.Context[CodingBot]): - response = await self.http.api["some-random-api"]["bottoken"]() - json = await response.json() + first_string = ctx.author.id + last_string = random.randint(1000000000,9999999999) - bottoken = json['token'] + token1 = base64.b64encode(f"{first_string}".encode("utf-8")).decode("utf-8") + token2 = base64.b64encode(f"{last_string}".encode("utf-8")).decode("utf-8") - embed = discord.Embed(title="Ha ha ha, I grabbed your bot token.", description=bottoken, color=discord.Color.random()) + final_token = f"{token1}.{token2}" + + embed = discord.Embed(title="Ha ha ha, I grabbed your bot token.", description=final_token, color=discord.Color.random()) embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) await self.bot.reply(ctx, embed=embed) From 2df7c43e6c2dad156a2c382eb373b81e24aa2c81 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Fri, 2 Jun 2023 20:17:26 +0530 Subject: [PATCH 02/16] fixed typo in binary decoder command --- cogs/fun.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index 079f4c5..522a5d1 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -183,9 +183,9 @@ async def binary_decode(self, ctx: commands.Context[CodingBot], binary: str): return await self.bot.reply(ctx, "The binary is an invalid length.") binary = binary.replace(" ", "") string = "".join(chr(int(binary[i:i+8], 2)) for i in range(0, len(binary), 8)) - embed = discord.Embed(title="Encoded to binary", description=string, color=discord.Color.random()) + embed = discord.Embed(title="Decoded from binary", description=string, color=discord.Color.random()) embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - + await self.bot.reply(ctx,embed=embed) @commands.hybrid_command(name="lyrics") From 35eefd85dff66f86d2cc0d6e7ba2b0d759dc09a3 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Fri, 2 Jun 2023 20:18:42 +0530 Subject: [PATCH 03/16] fixed rock api --- ext/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/http.py b/ext/http.py index bde657b..92ca40b 100644 --- a/ext/http.py +++ b/ext/http.py @@ -14,8 +14,8 @@ def __init__(self, session: aiohttp.ClientSession): }, # ////////////////////////////////////////////////////////////////////////////////////// "rock": { - "random": lambda: self.get("https://rockapi.apiworks.tech/random", _json=True), - "top": lambda: self.get("https://rockapi.apiworks.tech/top"), + "random": lambda: self.get("https://rockapi.apiworks.tech/rock/random", _json=True), + "top": lambda: self.get("https://rockapi.apiworks.tech/rock/top"), }, "numbers": { "random": lambda _type="trivia": self.api["numbers"]["random_"+_type](), From be0b53fc2ecb08dcfb98cedd2c11dfcd4776fbd2 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Fri, 2 Jun 2023 20:28:49 +0530 Subject: [PATCH 04/16] fixed joke command --- cogs/fun.py | 31 ++++++++++++++++++++++++++----- ext/http.py | 3 +++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index 522a5d1..1e092c3 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -102,13 +102,34 @@ async def meme(self, ctx: commands.Context[CodingBot]): @commands.hybrid_command(name="joke") async def joke(self, ctx: commands.Context[CodingBot]): - response = await self.http.api["some-random-api"]["joke"]() - joke = response['joke'] + joke_json = await self.http.api["get"]["joke"]["api"]() + + parts = joke_json['type'] + + if parts == "single": - embed = discord.Embed(title="He're a joke", description=joke) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + joke = joke_json['joke'] + + embed = self.bot.embed( + title = "Here's a joke for you:", + description = joke, + color = discord.Color.random() + ) + + return await self.bot.reply(ctx, embed=embed) + + else: + setup = joke_json['setup'] + delivery = joke_json['delivery'] + + embed = self.bot.embed( + title = "Here's a joke for you:", + description = f"{setup}\n\n||{delivery}||", + color = discord.Color.random() + ) + await self.bot.reply(ctx, embed=embed) + - await self.bot.reply(ctx, embed=embed) @commands.hybrid_command(name="8ball") async def eightball(self, ctx: commands.Context[CodingBot], *, question: str): diff --git a/ext/http.py b/ext/http.py index 92ca40b..bcf3602 100644 --- a/ext/http.py +++ b/ext/http.py @@ -55,6 +55,9 @@ def __init__(self, session: aiohttp.ClientSession): "brightness": lambda pfp: f"https://some-random-api.ml/canvas/brightness?avatar={pfp}", "threshold": lambda pfp: f"https://some-random-api.ml/canvas/threshold?avatar={pfp}", } + }, + "joke": { + "api": "https://v2.jokeapi.dev/joke/Programming" } } From ac542de732d37ae5c75bb70fe676b051a61f55a6 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sat, 3 Jun 2023 11:47:41 +0530 Subject: [PATCH 05/16] fixed welcome card --- ext/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/helpers.py b/ext/helpers.py index c61746d..9b23f6f 100644 --- a/ext/helpers.py +++ b/ext/helpers.py @@ -189,7 +189,7 @@ def generate_image(self, member: discord.Member, **kwargs: Any) -> discord.File: else: if vanity: invite = vanity - if len(invite.code) > 15: + if len(invite.code) > 7: invite.code = f'{invite.code[:15]}...' text = f'• Joined using vanity invite: {invite.code} ({invite.uses} uses)' else: From 4255d913618a4919d0060e8faff736d1e6cdfd57 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sat, 3 Jun 2023 11:54:52 +0530 Subject: [PATCH 06/16] added owner ids to CodingBot --- ext/models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/models.py b/ext/models.py index 9554480..9bd1f32 100644 --- a/ext/models.py +++ b/ext/models.py @@ -353,6 +353,14 @@ def __init__(self) -> None: self.afk_cache: Dict[int, Dict[int, Tuple[str, int]]] = {} self.version: Version = VERSION self.logger: logging.Logger = create_logger("CodingBot") + self.owner_ids = [ + 556119013298667520, # Swas.py + 879644654587478027, # Swas's alt + 690420846774321221, # BobDotCom + 579041484796461076, # Conch.py + 687882857171255309, # Lexionas74 + 462067035556282378, # Gxpy + ] async def setup_hook(self) -> None: self.raid_checker.check_for_raid.start() From 1b50562e1cdf62b939a49e79cf89d9a3e918fcb9 Mon Sep 17 00:00:00 2001 From: Ayu Itz <77532758+ayush-py-dev@users.noreply.github.com> Date: Sat, 3 Jun 2023 13:15:59 +0530 Subject: [PATCH 07/16] fixed welcome banner typo --- ext/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/helpers.py b/ext/helpers.py index 9b23f6f..5ae514b 100644 --- a/ext/helpers.py +++ b/ext/helpers.py @@ -190,7 +190,7 @@ def generate_image(self, member: discord.Member, **kwargs: Any) -> discord.File: if vanity: invite = vanity if len(invite.code) > 7: - invite.code = f'{invite.code[:15]}...' + invite.code = f'{invite.code[:7]}...' text = f'• Joined using vanity invite: {invite.code} ({invite.uses} uses)' else: text = 'I couldn\'t find who invited them' From aee8df2b2906c52edc1cbb01e0b69e6732feab6a Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sat, 3 Jun 2023 18:37:16 +0530 Subject: [PATCH 08/16] fixed welcome card again --- ext/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/helpers.py b/ext/helpers.py index 9b23f6f..5ae514b 100644 --- a/ext/helpers.py +++ b/ext/helpers.py @@ -190,7 +190,7 @@ def generate_image(self, member: discord.Member, **kwargs: Any) -> discord.File: if vanity: invite = vanity if len(invite.code) > 7: - invite.code = f'{invite.code[:15]}...' + invite.code = f'{invite.code[:7]}...' text = f'• Joined using vanity invite: {invite.code} ({invite.uses} uses)' else: text = 'I couldn\'t find who invited them' From e384e085f3cd05758f7c8dee329072a1222b21fd Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sat, 3 Jun 2023 20:00:40 +0530 Subject: [PATCH 09/16] Changes made: - added help messages in most commands - uncommented spotify commands - commented out some commands that are not working - fixed bug in cogs.moderation - removed devbio status from bot in cogs.tasks --- cogs/moderation.py | 15 +++++++++++---- cogs/tasks.py | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cogs/moderation.py b/cogs/moderation.py index a090ffb..01dc3aa 100644 --- a/cogs/moderation.py +++ b/cogs/moderation.py @@ -11,7 +11,7 @@ from ext.errors import InsufficientPrivilegeError from ext.models import CodingBot, TimeConverter from ext.ui.view import ConfirmButton - +from ext.consts import TCR_MEMBER_ROLE_ID if TYPE_CHECKING: from ext.models import CodingBot @@ -684,14 +684,14 @@ async def welcomer( await ctx.send_help('welcomer') @welcomer.command(name="enable") - async def welcomer_enable(self, ctx: commands.Context[CodingBot]) -> None: + async def welcomer_enable(self, ctx: commands.Context[CodingBot], help = "Enable welcomer") -> None: if not self.bot.welcomer_enabled: self.bot.welcomer_enabled = True await self.bot.reply(ctx, "Welcomer is now enabled.") else: await self.bot.reply(ctx, "Welcomer is already enabled.") - @welcomer.command(name="disable") + @welcomer.command(name="disable", help = "Disable welcomer") async def welcomer_disable(self, ctx: commands.Context[CodingBot]) -> None: if self.bot.welcomer_enabled: self.bot.welcomer_enabled = False @@ -699,7 +699,7 @@ async def welcomer_disable(self, ctx: commands.Context[CodingBot]) -> None: else: await self.bot.reply(ctx, "Welcomer is already disabled.") - @welcomer.command(name="redirect") + @welcomer.command(name="redirect", help = "Set welcomer channel") async def welcomer_redirect( self, ctx: commands.Context[CodingBot], @@ -724,11 +724,18 @@ async def raid_mode(self, ctx: commands.Context[CodingBot]) -> None: Raid mode commands Commands: + {prefix}raid-mode enable *start raid mode* + {prefix}raid-mode disable *stop raid mode* """ await ctx.send_help('raid-mode') @raid_mode.command(name="enable") async def raid_mode_enable(self, ctx: commands.Context[CodingBot]) -> None: + """ + Enable raid mode + + This will ban all members that have joined during the raid. + """ if not self.bot.raid_mode_enabled: if self.bot.raid_checker.possible_raid: self.bot.raid_mode_enabled = True diff --git a/cogs/tasks.py b/cogs/tasks.py index e20c1a2..efd9534 100644 --- a/cogs/tasks.py +++ b/cogs/tasks.py @@ -28,7 +28,7 @@ async def status_change(self): statuses = ['over TCR', 'you', 'swas', '@everyone', 'general chat', 'discord', ',help', 'your mom', 'bob and shadow argue', 'swas simp for false', 'new members', 'the staff team', 'helpers', 'code', 'mass murders', 'karen be an idiot', 'a video', 'watches', 'bob', 'fight club', 'youtube', - 'https://devbio.me/u/CodingBot', 'potatoes', 'simps', 'people', 'my server', 'humans destroy the world', + 'potatoes', 'simps', 'people', 'my server', 'humans destroy the world', 'AI take over the world', 'female bots 😳', 'dinosaurs', 'https://youtu.be/o-YBDTqX_ZU', 'idiots', 'the beginning of WWIII', 'verified bot tags with envy', 'Server Boosters (boost to get your name on here)', 'OG members', "dalek rising from the ashes", 'spongebob', 'turtles', 'SQUIRREL!!!', 'people get banned', From 5b0052fd6a8d14742ef77ae75b6bd503eed9712c Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sat, 3 Jun 2023 20:02:58 +0530 Subject: [PATCH 10/16] same as last commit --- cogs/developer.py | 56 +++++++++++ cogs/fun.py | 234 ++++++++++++++++++++++++---------------------- cogs/general.py | 21 +++++ cogs/helper.py | 31 +++++- cogs/misc.py | 72 ++++++++++---- 5 files changed, 280 insertions(+), 134 deletions(-) diff --git a/cogs/developer.py b/cogs/developer.py index 6c9f697..a5b7e04 100644 --- a/cogs/developer.py +++ b/cogs/developer.py @@ -37,6 +37,13 @@ async def sync(self, ctx: commands.Context[CodingBot]): @commands.command(name='load', aliases=['l']) @commands.is_owner() async def _load(self, ctx: commands.Context[CodingBot], cog_: str): + """ + Load a cog + + Usage: + ------ + `{prefix}load [cog]` + """ try: await self.bot.load_extension(cog_) embed = discord.Embed( @@ -55,6 +62,14 @@ async def _load(self, ctx: commands.Context[CodingBot], cog_: str): @commands.command(name='unload', aliases=['u']) @commands.is_owner() async def _unload(self, ctx: commands.Context[CodingBot], cog_: str): + """ + Unload a cog + + Usage: + ------ + `{prefix}unload [cog]` + + """ try: await self.bot.unload_extension(cog_) embed = discord.Embed( @@ -73,6 +88,13 @@ async def _unload(self, ctx: commands.Context[CodingBot], cog_: str): @commands.command(name='reload', aliases=['r']) @commands.is_owner() async def _reload(self, ctx: commands.Context[CodingBot], cog_: str): + """ + Reload a cog + + Usage: + ------ + `{prefix}reload [cog]` + """ try: await self.bot.reload_extension(cog_) embed = discord.Embed( @@ -91,6 +113,14 @@ async def _reload(self, ctx: commands.Context[CodingBot], cog_: str): @commands.command(name='loadall', aliases=['la']) @commands.is_owner() async def _loadall(self, ctx: commands.Context[CodingBot]): + """ + Load all cogs + + Usage: + ------ + `{prefix}loadall` + + """ data = os.listdir('./cogs') cogs: Dict[str, List[str]] = { 'loaded': [], @@ -114,6 +144,14 @@ async def _loadall(self, ctx: commands.Context[CodingBot]): @commands.command(name='unloadall', aliases=['ua', 'uall']) @commands.is_owner() async def _unloadall(self, ctx: commands.Context[CodingBot]): + """ + Unload all cogs + + Usage: + ------ + `{prefix}unloadall` + + """ cogs: Dict[str, List[str]] = { 'unloaded': [], 'not': [] @@ -133,6 +171,14 @@ async def _unloadall(self, ctx: commands.Context[CodingBot]): @commands.command(name='reloadall', aliases=['ra', 'rall']) @commands.is_owner() async def _reloadall(self, ctx: commands.Context[CodingBot]): + """ + Reload all cogs + + Usage: + ------ + `{prefix}reloadall` + + """ cogs: Dict[str, List[str]] = { 'reloaded': [], 'not': [] @@ -153,6 +199,16 @@ async def _reloadall(self, ctx: commands.Context[CodingBot]): @commands.command(name='getusermetric', aliases=['gum'], hidden=True) @commands.is_owner() async def _getusermetric(self, ctx: commands.Context[CodingBot], member: discord.Member): + """ + Get user metric + + Usage: + ------ + `{prefix}getusermetric [member]` + + """ + member = member or ctx.author + record = await self.bot.conn.select_record( 'thanks', table='thanks_info', diff --git a/cogs/fun.py b/cogs/fun.py index 1e092c3..ff145b9 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -31,9 +31,11 @@ async def trash( user: discord.Member ): """ - See your or mentioned user's pp - Example: {prefix}pp @user - Example: {prefix}pp + Throw someone in the trash + Usage: + ------ + `{prefix}trash ` + """ resp1 = await ctx.author.display_avatar.read() resp2 = await user.display_avatar.read() @@ -45,6 +47,14 @@ async def trash( @commands.hybrid_command() async def rock(self, ctx: commands.Context[CodingBot], *, query: Optional[str] = None): + """ + Get a random rock + Usage: + ------ + `{prefix}rock`: *will get a random rock* + `{prefix}rock [rock]`: *will get the [rock]* + + """ rock_info = await get_rock(self) return await self.bot.reply( ctx, @@ -161,27 +171,27 @@ async def token(self, ctx: commands.Context[CodingBot]): embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) await self.bot.reply(ctx, embed=embed) - @commands.hybrid_command(name="animal") - async def animal(self, ctx: commands.Context[CodingBot], animal: Optional[str] = None): - options = ("dog", "cat", "panda", "fox", "red_panda", "koala", "bird", "raccoon", "kangaroo") - if (not animal) or (animal and animal not in options): - animal = random.choice(options) - - response = await self.http.api["some-random-api"]["animal"](animal) - if response.status in range(200,300): - json = await response.json() - - image = json["image"] - fact = json["fact"] - - embed = discord.Embed(title="Here's the animal image you asked.", color=discord.Color.random()) - embed.set_image(url=image) - embed.set_footer(text=fact) - else: - embed = discord.Embed(title="ERROR!", description=f"Received a bad status code of {response.status}") - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # @commands.hybrid_command(name="animal") + # async def animal(self, ctx: commands.Context[CodingBot], animal: Optional[str] = None): + # options = ("dog", "cat", "panda", "fox", "red_panda", "koala", "bird", "raccoon", "kangaroo") + # if (not animal) or (animal and animal not in options): + # animal = random.choice(options) + + # response = await self.http.api["some-random-api"]["animal"](animal) + # if response.status in range(200,300): + # json = await response.json() + + # image = json["image"] + # fact = json["fact"] + + # embed = discord.Embed(title="Here's the animal image you asked.", color=discord.Color.random()) + # embed.set_image(url=image) + # embed.set_footer(text=fact) + # else: + # embed = discord.Embed(title="ERROR!", description=f"Received a bad status code of {response.status}") + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) + # await self.bot.reply(ctx,embed=embed) @commands.hybrid_group(invoke_without_command=True) async def binary(self, ctx: commands.Context[CodingBot]): @@ -209,31 +219,31 @@ async def binary_decode(self, ctx: commands.Context[CodingBot], binary: str): await self.bot.reply(ctx,embed=embed) - @commands.hybrid_command(name="lyrics") - async def lyrics(self, ctx: commands.Context[CodingBot], *, query: str = None): - if not query: - embed = discord.Embed(title = "Hey! I'm confused", description=f"You must provide a search argument or I couldn't find the lyrics") - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # @commands.hybrid_command(name="lyrics") + # async def lyrics(self, ctx: commands.Context[CodingBot], *, query: str = None): + # if not query: + # embed = discord.Embed(title = "Hey! I'm confused", description=f"You must provide a search argument or I couldn't find the lyrics") + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - response = await self.http.api["some-random-api"]["lyrics"](query) - if response.status in range(200, 300): - json = await response.json() + # response = await self.http.api["some-random-api"]["lyrics"](query) + # if response.status in range(200, 300): + # json = await response.json() - lyrics = json['lyrics'] - artist = json['author'] - title = json['title'] - thumbnail = json['thumbnail']['genius'] + # lyrics = json['lyrics'] + # artist = json['author'] + # title = json['title'] + # thumbnail = json['thumbnail']['genius'] - for chunk in wrap(lyrics, 4096, replace_whitespace = False): - embed = discord.Embed(title = f"{artist} - {title}", description = chunk, color=discord.Color.random()) - embed.set_thumbnail(url=thumbnail) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # for chunk in wrap(lyrics, 4096, replace_whitespace = False): + # embed = discord.Embed(title = f"{artist} - {title}", description = chunk, color=discord.Color.random()) + # embed.set_thumbnail(url=thumbnail) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - else: - embed = discord.Embed(title="ERROR!", description=f"Received a bad status code of {response.status}") - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # else: + # embed = discord.Embed(title="ERROR!", description=f"Received a bad status code of {response.status}") + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) + # await self.bot.reply(ctx,embed=embed) @commands.hybrid_command(name="reverse") async def reverse(self, ctx: commands.Context[CodingBot], *, text: str): @@ -248,75 +258,75 @@ async def owofy(self, ctx: commands.Context[CodingBot], *, text: str): await self.bot.reply(ctx,embed=embed) # Filters command - @commands.hybrid_group(invoke_without_command=True) - async def filter(self, ctx: commands.Context[CodingBot]): - embed = discord.Embed(title="Filter command", description="Available methods: `invert`, `greyscale`, `colour [hex]`", color=discord.Color.random()) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) - - @filter.command(name="invert") - async def filter_invert(self, ctx: commands.Context[CodingBot], member: discord.Member = None): - if not member: - member = ctx.author - pfp = member.display_avatar.url - response = await self.http.api["some-random-api"]["filters"]["invert"](pfp) - - embed = discord.Embed(title="Filter command - Invert", color=discord.Color.random()) - embed.set_image(url=response) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) - - @filter.command(name="greyscale") - async def filter_greyscale(self, ctx: commands.Context[CodingBot], member: discord.Member = None): - if not member: - member = ctx.author - pfp = member.display_avatar.url - response = await self.http.api["some-random-api"]["filters"]["greyscale"](pfp) - - embed = discord.Embed(title="Filter command - Greyscale", color=discord.Color.random()) - embed.set_image(url=response) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) - - @filter.command(name="colour") - async def filter_colour(self, ctx: commands.Context[CodingBot], member: discord.Member = None, hex_code: str = None): - if not member: - member = ctx.author - if not hex_code: - embed = discord.Embed(title="ERROR!", description="No Hex? Hex colour code is required") - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - hex_code = hex_code.replace('#', '') - pfp = member.display_avatar.url - response = await self.http.api["some-random-api"]["filters"]["greyscale"](pfp, hex_code) - - embed = discord.Embed(title="Filter command - Colour", color=discord.Color.random()) - embed.set_image(url=response) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) - - @filter.command(name="brightness") - async def filter_brightness(self, ctx: commands.Context[CodingBot], member: discord.Member = None): - if not member: - member = ctx.author - pfp = member.display_avatar.url - response = await self.http.api["some-random-api"]["filters"]["brightness"](pfp) - - embed = discord.Embed(title="Filter command - Brightness", color=discord.Color.random()) - embed.set_image(url=response) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) - - @filter.command(name="threshold") - async def filter_threshold(self, ctx: commands.Context[CodingBot], member: discord.Member = None): - if not member: - member = ctx.author - pfp = member.display_avatar.url - response = await self.http.api["some-random-api"]["filters"]["threshold"](pfp) - - embed = discord.Embed(title="Filter command - Threshold", color=discord.Color.random()) - embed.set_image(url=response) - embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) - await self.bot.reply(ctx,embed=embed) + # @commands.hybrid_group(invoke_without_command=True) + # async def filter(self, ctx: commands.Context[CodingBot]): + # embed = discord.Embed(title="Filter command", description="Available methods: `invert`, `greyscale`, `colour [hex]`", color=discord.Color.random()) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # await self.bot.reply(ctx,embed=embed) + + # @filter.command(name="invert") + # async def filter_invert(self, ctx: commands.Context[CodingBot], member: discord.Member = None): + # if not member: + # member = ctx.author + # pfp = member.display_avatar.url + # response = await self.http.api["some-random-api"]["filters"]["invert"](pfp) + + # embed = discord.Embed(title="Filter command - Invert", color=discord.Color.random()) + # embed.set_image(url=response) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # await self.bot.reply(ctx,embed=embed) + + # @filter.command(name="greyscale") + # async def filter_greyscale(self, ctx: commands.Context[CodingBot], member: discord.Member = None): + # if not member: + # member = ctx.author + # pfp = member.display_avatar.url + # response = await self.http.api["some-random-api"]["filters"]["greyscale"](pfp) + + # embed = discord.Embed(title="Filter command - Greyscale", color=discord.Color.random()) + # embed.set_image(url=response) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # await self.bot.reply(ctx,embed=embed) + + # @filter.command(name="colour") + # async def filter_colour(self, ctx: commands.Context[CodingBot], member: discord.Member = None, hex_code: str = None): + # if not member: + # member = ctx.author + # if not hex_code: + # embed = discord.Embed(title="ERROR!", description="No Hex? Hex colour code is required") + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # hex_code = hex_code.replace('#', '') + # pfp = member.display_avatar.url + # response = await self.http.api["some-random-api"]["filters"]["greyscale"](pfp, hex_code) + + # embed = discord.Embed(title="Filter command - Colour", color=discord.Color.random()) + # embed.set_image(url=response) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # await self.bot.reply(ctx,embed=embed) + + # @filter.command(name="brightness") + # async def filter_brightness(self, ctx: commands.Context[CodingBot], member: discord.Member = None): + # if not member: + # member = ctx.author + # pfp = member.display_avatar.url + # response = await self.http.api["some-random-api"]["filters"]["brightness"](pfp) + + # embed = discord.Embed(title="Filter command - Brightness", color=discord.Color.random()) + # embed.set_image(url=response) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # await self.bot.reply(ctx,embed=embed) + + # @filter.command(name="threshold") + # async def filter_threshold(self, ctx: commands.Context[CodingBot], member: discord.Member = None): + # if not member: + # member = ctx.author + # pfp = member.display_avatar.url + # response = await self.http.api["some-random-api"]["filters"]["threshold"](pfp) + + # embed = discord.Embed(title="Filter command - Threshold", color=discord.Color.random()) + # embed.set_image(url=response) + # embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) + # await self.bot.reply(ctx,embed=embed) async def setup(bot: CodingBot): await bot.add_cog(Fun(bot)) diff --git a/cogs/general.py b/cogs/general.py index f9e3508..4204b6e 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -111,12 +111,26 @@ async def define(self, ctx: commands.Context[CodingBot], *, word: str): @commands.hybrid_group(invoke_without_command=True) async def avatar(self, ctx: commands.Context[CodingBot]): + """ + Commands for getting avatars. + + Usage: + ------ + `{prefix}avatar` *will send a list of available methods* + """ embed = discord.Embed(title="Avatar command", description="Available methods: `main`, `display`") embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) await self.bot.reply(ctx,embed=embed) @avatar.command(name="main") async def avatar_main(self, ctx: commands.Context[CodingBot], member: discord.Member): + """ + Returns the main avatar of a user. + + Usage: + ------ + `{prefix}avatar main [user]` *will send the main avatar of the user* + """ embed = discord.Embed(title=f"{member}'s Main Avatar", description=f"Showing {member.mention}'s Main Avatar", color=discord.Color.random()) embed.set_image(url=member.avatar.url) embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) @@ -124,6 +138,13 @@ async def avatar_main(self, ctx: commands.Context[CodingBot], member: discord.Me @avatar.command(name="display") async def avatar_display(self, ctx: commands.Context[CodingBot], member: discord.Member): + """ + Returns the display avatar of a user. + + Usage: + ------ + `{prefix}avatar display [user]` *will send the display avatar of the user* + """ embed = discord.Embed(title=f"{member}'s Avatar", description=f"Showing {member.mention}'s Avatar", color=discord.Color.random()) embed.set_image(url=member.display_avatar.url) embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) diff --git a/cogs/helper.py b/cogs/helper.py index 393733c..a48acb1 100644 --- a/cogs/helper.py +++ b/cogs/helper.py @@ -227,7 +227,13 @@ async def help_warnings( ctx: commands.Context[CodingBot], member: discord.Member ) -> None: - + """ + Shows a list of help warnings for a member. + + Usage: + {prefix}helper warnings + + """ embed = discord.Embed( title=f"{member} Help warnings List", color=discord.Color.red()) records = await self.bot.conn.select_record( @@ -252,13 +258,19 @@ async def help_warnings( await self.bot.reply(ctx,embed=embed) - @helper.command(name="clearwarning") + @helper.command(name="clearwarning", aliases = ['chw']) async def help_clearwarning( self, ctx: commands.Context[CodingBot], member: discord.Member, index: int = None ) -> None: + """ + Clears a help warning from a member. + + Usage: + {prefix}helper clearwarning [index] + """ warn = None target = member or ctx.author @@ -304,7 +316,12 @@ async def help_ban( *, reason: str ) -> None: + """ + Ban someone from help channels + Usage: + {prefix}helper ban + """ help_ban_role = ctx.guild.get_role(HELP_BAN_ROLE_ID) read_help_rules_role = ctx.guild.get_role(READ_HELP_RULES_ROLE_ID) if help_ban_role in member.roles: @@ -327,7 +344,12 @@ async def help_unban( ctx: commands.Context[CodingBot], member: discord.Member ) -> None: + """ + Unban someone from help channels + Usage: + {prefix}helper unban + """ help_ban_role = ctx.guild.get_role(HELP_BAN_ROLE_ID) read_help_rules_role = ctx.guild.get_role(READ_HELP_RULES_ROLE_ID) if not help_ban_role in member.roles: @@ -351,7 +373,12 @@ async def help_verify( ctx: commands.Context[CodingBot], target: discord.Member ) -> None: + """ + Help verify a member + Usage: + {prefix}helper verify + """ read_help_rules_role = ctx.guild.get_role(READ_HELP_RULES_ROLE_ID) if read_help_rules_role in target.roles: diff --git a/cogs/misc.py b/cogs/misc.py index e68c4fe..95c82eb 100644 --- a/cogs/misc.py +++ b/cogs/misc.py @@ -66,8 +66,7 @@ async def afk(self, ctx: commands.Context[CodingBot], *, reason: Optional[str] = assert isinstance(ctx.author, discord.Member) assert ctx.guild is not None - if not reason: - reason = "AFK" + reason = reason or "AFK" member = ctx.author staff_role = ctx.guild.get_role(795145820210462771) on_pat_staff = member.guild.get_role(726441123966484600) # "on_patrol_staff" role @@ -147,6 +146,13 @@ async def run(self, ctx, *, codeblock: str): @commands.hybrid_group(name="thanks", invoke_without_command=True) @commands.cooldown(1, 10, commands.BucketType.member) async def thanks(self, ctx: commands.Context[CodingBot], member: discord.Member): + """ + See how many thanks someone has. + + Usage: + ------ + `{prefix}thanks {user}`: *will show how many thanks user has* + """ record = await self.bot.conn.select_record( 'thanks', table='thanks_info', @@ -205,6 +211,13 @@ async def thank(self, ctx: commands.Context[CodingBot], member: discord.Member, @thank.command(name="show") @commands.has_any_role(783909939311280129, 797688360806121522) async def thank_show(self, ctx: commands.Context[CodingBot], member: discord.Member): + """ + Show the thanks information of a user. + + Usage: + ------ + `{prefix}thank show {user}`: *will show the thanks information of user* + """ records = await self.bot.conn.select_record( 'thanks', table='thanks_data', @@ -253,6 +266,14 @@ async def thank_show(self, ctx: commands.Context[CodingBot], member: discord.Mem @thank.command(name="delete") @commands.has_any_role(783909939311280129, 797688360806121522) async def thank_delete(self, ctx: commands.Context[CodingBot], thank_id: str): + """ + Delete a thank. + + Usage: + ------ + `{prefix}thank delete [thank_id]`: *will delete the thank with the id [thank_id]* + + """ record = await self.bot.conn.select_record( 'thanks', table='thanks_data', @@ -333,6 +354,9 @@ async def thank_leaderboard(self, ctx: commands.Context[CodingBot]): @commands.hybrid_group(invoke_without_command=True) async def trainee(self, ctx: commands.Context[CodingBot]): + """ + Sends the trainee help menu. + """ await ctx.send_help('trainee') @trainee.command(name="list") @@ -362,23 +386,31 @@ async def trainee_list(self, ctx: commands.Context[CodingBot]): ) await self.bot.reply(ctx, embed=embed) - # @commands.hybrid_command(aliases=['sp']) - # @commands.cooldown(5, 60.0, type=commands.BucketType.user) - # async def spotify(self, ctx: commands.Context, member: discord.Member = None): - # member = member or ctx.author - # spotify = Spotify(bot=self.bot, member=member) - # embed = await spotify.get_embed() - # if not embed: - # if member == ctx.author: - # return await ctx.reply(f"You are currently not listening to spotify!", mention_author=False) - # return await self.bot.reply( - # ctx, - # f"{member.mention} is not listening to Spotify", - # mention_author=False, - # allowed_mentions=discord.AllowedMentions(users=False) - # ) - # embed, file, view = embed - # await self.bot.send(ctx, embed=embed, file=file, view=view) + @commands.hybrid_command(aliases=['sp']) + @commands.cooldown(5, 60.0, type=commands.BucketType.user) + async def spotify(self, ctx: commands.Context, member: discord.Member = None): + """ + Shows the spotify status of a member. + + Usage: + ------ + `{prefix}spotify`: *will show your spotify status* + `{prefix}spotify [member]`: *will show the spotify status of [member]* + """ + member = member or ctx.author + spotify = Spotify(bot=self.bot, member=member) + embed = await spotify.get_embed() + if not embed: + if member == ctx.author: + return await ctx.reply(f"You are currently not listening to spotify!", mention_author=False) + return await self.bot.reply( + ctx, + f"{member.mention} is not listening to Spotify", + mention_author=False, + allowed_mentions=discord.AllowedMentions(users=False) + ) + embed, file, view = embed + await self.bot.send(ctx, embed=embed, file=file, view=view) # @commands.command(name='sauce') # async def sauce(self, ctx: commands.Context[CodingBot], source: Optional[str] = None): @@ -433,7 +465,7 @@ async def trainee_list(self, ctx: commands.Context[CodingBot]): # embed = discord.Embed(timestamp=discord.utils.utcnow()) # embed.add_field( - # name="Anime Title", + # name="Anime Title", DD # value=f"Native: {native}\nEnglish: {english}\nRomaji: {romaji}", # inline=False # ) From e5dc761ba70fabc49716db2a622e36f8cfce3a4e Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sun, 4 Jun 2023 02:18:49 +0530 Subject: [PATCH 11/16] added help for joke command --- cogs/fun.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cogs/fun.py b/cogs/fun.py index ff145b9..b7727c2 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -112,6 +112,13 @@ async def meme(self, ctx: commands.Context[CodingBot]): @commands.hybrid_command(name="joke") async def joke(self, ctx: commands.Context[CodingBot]): + """ + Tells a programming joke + + Usage: + ------ + `{prefix}joke`: *will get a random joke* + """ joke_json = await self.http.api["get"]["joke"]["api"]() parts = joke_json['type'] From 7ebe575e996082f4efb3c4e7fa4aa983ccfd065c Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sun, 4 Jun 2023 02:30:59 +0530 Subject: [PATCH 12/16] joke command fixed and temp. changed prefix to > --- cogs/fun.py | 6 +++--- ext/http.py | 2 +- ext/models.py | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index b7727c2..9143f16 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -119,7 +119,7 @@ async def joke(self, ctx: commands.Context[CodingBot]): ------ `{prefix}joke`: *will get a random joke* """ - joke_json = await self.http.api["get"]["joke"]["api"]() + joke_json = await self.http.api["joke"]["api"]() parts = joke_json['type'] @@ -127,7 +127,7 @@ async def joke(self, ctx: commands.Context[CodingBot]): joke = joke_json['joke'] - embed = self.bot.embed( + embed = await self.bot.embed( title = "Here's a joke for you:", description = joke, color = discord.Color.random() @@ -139,7 +139,7 @@ async def joke(self, ctx: commands.Context[CodingBot]): setup = joke_json['setup'] delivery = joke_json['delivery'] - embed = self.bot.embed( + embed = await self.bot.embed( title = "Here's a joke for you:", description = f"{setup}\n\n||{delivery}||", color = discord.Color.random() diff --git a/ext/http.py b/ext/http.py index bcf3602..a4f679b 100644 --- a/ext/http.py +++ b/ext/http.py @@ -57,7 +57,7 @@ def __init__(self, session: aiohttp.ClientSession): } }, "joke": { - "api": "https://v2.jokeapi.dev/joke/Programming" + "api": lambda: self.get("https://v2.jokeapi.dev/joke/Programming", _json=True), } } diff --git a/ext/models.py b/ext/models.py index 9bd1f32..81c3e10 100644 --- a/ext/models.py +++ b/ext/models.py @@ -334,7 +334,7 @@ def __init__(self) -> None: } ) super().__init__( - command_prefix=[')'], intents=INTENTS, case_insensitive=True, + command_prefix=['>'], intents=INTENTS, case_insensitive=True, help_command=help_command ) self.conn: Database = discord.utils.MISSING @@ -360,6 +360,7 @@ def __init__(self) -> None: 579041484796461076, # Conch.py 687882857171255309, # Lexionas74 462067035556282378, # Gxpy + 748053138354864229, # Ayu ] async def setup_hook(self) -> None: From a3f7e249caf95963b1c425d76d3ee8220f7935d7 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sun, 4 Jun 2023 03:05:49 +0530 Subject: [PATCH 13/16] made token command better and removed Rock view --- cogs/fun.py | 18 +++++++--------- ext/helpers.py | 5 ++--- ext/ui/view.py | 56 -------------------------------------------------- 3 files changed, 9 insertions(+), 70 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index 9143f16..f47694c 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -58,13 +58,7 @@ async def rock(self, ctx: commands.Context[CodingBot], *, query: Optional[str] = rock_info = await get_rock(self) return await self.bot.reply( ctx, - embed=rock_info[0], - view=Rocks( - cog=self, - embed_gen=get_rock, - stars=rock_info[1], - embed=rock_info[0], - ), + embed=rock_info, ) @commands.hybrid_command() @@ -167,14 +161,16 @@ async def eightball(self, ctx: commands.Context[CodingBot], *, question: str): @commands.hybrid_command(name="token") async def token(self, ctx: commands.Context[CodingBot]): first_string = ctx.author.id + middle_string = random.randint(0, 100) last_string = random.randint(1000000000,9999999999) - token1 = base64.b64encode(f"{first_string}".encode("utf-8")).decode("utf-8") - token2 = base64.b64encode(f"{last_string}".encode("utf-8")).decode("utf-8") + token_part1 = base64.b64encode(f"{first_string}".encode("utf-8")).decode("utf-8") + token_part2 = base64.b64encode(f"{middle_string}".encode("utf-8")).decode("utf-8") + token_part3 = base64.b64encode(f"{last_string}".encode("utf-8")).decode("utf-8") - final_token = f"{token1}.{token2}" + final_token = f"{token_part1}.{token_part2}.{token_part3}" - embed = discord.Embed(title="Ha ha ha, I grabbed your bot token.", description=final_token, color=discord.Color.random()) + embed = discord.Embed(title="Ha ha ha, I grabbed your token.", description=final_token, color=discord.Color.random()) embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.display_avatar.url) await self.bot.reply(ctx, embed=embed) diff --git a/ext/helpers.py b/ext/helpers.py index 5ae514b..12935fb 100644 --- a/ext/helpers.py +++ b/ext/helpers.py @@ -615,9 +615,8 @@ async def get_embed(self) -> Tuple[discord.Embed, discord.File, discord.ui.View] async def get_rock(self): rock = await self.http.api["rock"]["random"]() name = rock["name"] - desc = rock["desc"] + desc = rock["description"] image = rock["image"] - rating = rock["rating"] embed = await self.bot.embed( title=f"🪨 {name}", url=image or "https://www.youtube.com/watch?v=o-YBDTqX_ZU", @@ -625,7 +624,7 @@ async def get_rock(self): ) if image is not None and image != "none" and image != "": embed.set_thumbnail(url=image) - return (embed, rating) + return (embed) class AntiRaid: """ diff --git a/ext/ui/view.py b/ext/ui/view.py index 27d9778..7447347 100644 --- a/ext/ui/view.py +++ b/ext/ui/view.py @@ -15,62 +15,6 @@ from ext.models import CodingBot -class Rocks(discord.ui.View): - def __init__(self, *, cog, embed_gen, stars, embed): - self.cog = cog - self.embed_gen = embed_gen - self.pages = [ - (embed, stars), - ] - self.page = 0 - super().__init__() - for child in self.children: - if child.custom_id == "stars_count": - child.label = "⭐" * stars if stars else "o" - - @discord.ui.button(label="-", custom_id="stars_count") - async def stars_hud(self, interaction, button): - pass - - @discord.ui.button(label="<", custom_id="prev", disabled=True) - async def prev_rock(self, interaction, button): - if self.page == 0: - button.disabled = True - return await interaction.response.edit_message(view=self) - self.page -= 1 - data = self.pages[self.page * -1] - self.stars = data[1] - for child in self.children: - if child.custom_id == "stars_count": - child.label = "⭐" * self.stars if self.stars else "o" - elif child.custom_id == "next": - if self.page + 1 < len(self.pages): - child.Style = discord.ButtonStyle.gray - return await interaction.response.edit_message( - embed=data[0], view=self - ) - - @discord.ui.button( - label=">", custom_id="next", style=discord.ButtonStyle.green - ) - async def next_rock(self, interaction, button): - if self.page + 1 == len(self.pages): - button.Style = discord.ButtonStyle.green - await self.gen() - self.page += 1 - data = self.pages[self.page] - self.stars = data[1] - for child in self.children: - if child.custom_id == "stars_count": - child.label = "⭐" * self.stars if self.stars else "o" - elif child.custom_id == "prev": - child.disabled = False - await interaction.response.edit_message(embed=data[0], view=self) - - async def gen(self): - self.pages.append(await self.embed_gen(self.cog)) - - class Piston(discord.ui.View): def __init__( From 49b7de35af28bb83092ef5bb1599c705e56187a2 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sun, 4 Jun 2023 03:07:38 +0530 Subject: [PATCH 14/16] fixed afk command --- cogs/listeners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/listeners.py b/cogs/listeners.py index 18561f4..7f230c4 100644 --- a/cogs/listeners.py +++ b/cogs/listeners.py @@ -90,7 +90,7 @@ async def user_mentioned(self, message: discord.Message): for member in message.mentions: record = self.bot.afk_cache.get(message.guild.id) if record: - record = record.get(message.author.id) + record = record.get(member.id) if record: reason, time_ = record em = discord.Embed( From 765b04124527c21d9768a5b32d692eadd88af346 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sun, 4 Jun 2023 03:19:54 +0530 Subject: [PATCH 15/16] added repo mention for all repos --- cogs/listeners.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/cogs/listeners.py b/cogs/listeners.py index 7f230c4..eeda6be 100644 --- a/cogs/listeners.py +++ b/cogs/listeners.py @@ -236,17 +236,20 @@ async def invite_in_message(self, message: discord.Message): @commands.Cog.listener('on_message') async def repo_mention(self, message: discord.Message): - if 'discord.py' in message.content and not message.author.bot: - regex = re.search(r'Rapptz/discord.py(#\d+)?', message.content) - if regex: - base_link = "https://github.com/Rapptz/discord.py" - group = regex.group(0) - if '#' in group: - group = group.split('#')[1] - base_link += f"/pull/{group}" - resp = await self.bot.session.get(base_link) - if resp.ok: - await message.channel.send(base_link) + """ + Format: repo: user/repo + + Responds with a link to the repo. + """ + if message.content.lower().startswith('repo:') and not message.author.bot: + repo = message.content.split('repo:')[1].strip() + if '/' not in repo: + return + user, repo = repo.split('/') + base_link = f"https://github.com/{user}/{repo}" + resp = await self.bot.session.get(base_link) + if resp.ok: + await message.channel.send(base_link) From dec8a636a39a0f6cb4ef88b730dbf82e21a6c817 Mon Sep 17 00:00:00 2001 From: ayush-py-dev Date: Sun, 4 Jun 2023 03:23:49 +0530 Subject: [PATCH 16/16] removed Ayu's id from owner_ids --- ext/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/models.py b/ext/models.py index 81c3e10..4633da9 100644 --- a/ext/models.py +++ b/ext/models.py @@ -360,7 +360,6 @@ def __init__(self) -> None: 579041484796461076, # Conch.py 687882857171255309, # Lexionas74 462067035556282378, # Gxpy - 748053138354864229, # Ayu ] async def setup_hook(self) -> None: