From efa2bcf573bf727dfecc786262fe645683f71048 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:50:15 +0545 Subject: [PATCH 01/44] feat: add decorators for helping in using moderation commands --- peacebot/core/utils/permissions.py | 113 +++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 peacebot/core/utils/permissions.py diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py new file mode 100644 index 0000000..2932194 --- /dev/null +++ b/peacebot/core/utils/permissions.py @@ -0,0 +1,113 @@ +import hikari +import lightbulb + +from models import ModerationRoles + +from . import get + + +class PermissionsError(lightbulb.LightbulbError): + pass + + +async def has_permissions( + member: hikari.Member, permission: list[hikari.Permissions] +) -> bool: + roles = member.get_roles() + perms = hikari.Permissions.NONE + for role in roles: + perms |= role.permissions + + permissions = str(perms).split("|") + if set(permission) & set(permissions): + return True + return False + + +async def role_check(member: hikari.Member, role: hikari.Role) -> bool: + if role.id in member.role_ids: + return True + return False + + +async def get_role_data(guild: hikari.Guild) -> dict: + model = await ModerationRoles.get_or_none(guild_id=guild.id) + if ( + model is None + or model.admin_role is None + or model.mod_role is None + or model.moderation_role is None + ): + raise PermissionsError( + "Some or all Moderation roles are not setup, Please set them and try again!\n`/help role` for more info." + ) + + admin_role = guild.get_role(model.admin_role) + mod_role = guild.get_role(model.mod_role) + moderation_role = guild.get_role(model.moderation_role) + + return { + "admin_role": admin_role, + "mod_role": mod_role, + "moderation_role": moderation_role, + } + + +def moderation_role_check(f): + async def predicate(ctx: lightbulb.Context, *args, **kwargs): + moderation_role: hikari.Role = (await get_role_data(ctx.get_guild())).get( + "moderation_role" + ) + if not ( + await has_permissions(ctx.member, ["MANAGE_MESSAGES", "ADMINISTRATOR"]) + or await role_check(ctx.member, moderation_role) + ): + raise PermissionsError( + f"You need to have the permissions required to run this command!\nRole Required: {moderation_role.mention}" + ) + return await f(ctx, *args, **kwargs) + + return predicate + + +def mod_role_check(f): + async def predicate(ctx: lightbulb.Context, *args, **kwargs): + mod_role: hikari.Role = (await get_role_data(ctx.get_guild())).get("mod_role") + if not ( + await has_permissions(ctx.member, ["MANAGE_ROLES", "ADMINISTRATOR"]) + or await role_check(ctx.member, mod_role) + ): + raise PermissionsError( + f"You need to have the permissions required to run this command!\nRole Required: {mod_role.mention}" + ) + + return await f(ctx, *args, **kwargs) + + return predicate + + +def admin_role_check(f): + async def predicate(ctx: lightbulb.Context, *args, **kwargs): + admin_role: hikari.Role = (await get_role_data(ctx.get_guild())).get( + "admin_role" + ) + if not ( + await has_permissions(ctx.member, ["ADMINISTRATOR"]) + or await role_check(ctx.member, admin_role) + ): + raise PermissionsError( + f"You need to have the permissions required to run this command!\nRole Required: {admin_role.mention}" + ) + return await f(ctx, *args, **kwargs) + + return predicate + + +async def higher_role_check(author: hikari.Member, member: hikari.Member) -> None: + author_top_role = author.get_top_role() + member_top_role = member.get_top_role() + + if not author_top_role.position > member_top_role.position: + raise PermissionsError( + "You cannot run moderation commands on this user, as they have got similar permissions and roles to yours." + ) From 371fc292ed7f519e37fb71ea53838d9f4c0feb98 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:50:38 +0545 Subject: [PATCH 02/44] feat: add time conversion function --- peacebot/core/utils/helper_functions.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/peacebot/core/utils/helper_functions.py b/peacebot/core/utils/helper_functions.py index cc3c2ca..245f358 100644 --- a/peacebot/core/utils/helper_functions.py +++ b/peacebot/core/utils/helper_functions.py @@ -1,12 +1,18 @@ import functools import logging +import re import typing as t import lightbulb from lightbulb import LightbulbError +from .errors import HelpersError + logger = logging.getLogger(__name__) +time_regex = re.compile("(?:(\d{1,5})(h|s|m|d|w))+?") +time_dict = {"h": 3600, "s": 1, "m": 60, "d": 86400, "w": 604800} + class CommandError(LightbulbError): pass @@ -36,3 +42,20 @@ async def wrapper( return wrapper return prediate + + +def convert_time(argument: str) -> float: + args = argument.lower() + matches = re.findall(time_regex, args) + time = 0 + for value, key in matches: + try: + time += time_dict[key] * float(value) + except KeyError: + raise HelpersError( + f"{key} is an invalid time key!\nThe valid keys are h/m/s/d" + ) + except ValueError: + raise HelpersError(f"{value} is not a number.") + + return time From f573d3f81c30046a2d92ccfe824b902ea1aba557 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:51:00 +0545 Subject: [PATCH 03/44] feat : add some more error classes --- peacebot/core/utils/errors.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/peacebot/core/utils/errors.py b/peacebot/core/utils/errors.py index 04e1929..ab098c2 100644 --- a/peacebot/core/utils/errors.py +++ b/peacebot/core/utils/errors.py @@ -10,7 +10,16 @@ logger = logging.getLogger("error_handler") +class HelpersError(lightbulb.LightbulbError): + pass + + +class ModerationError(lightbulb.LightbulbError): + pass + + async def on_error(event: lightbulb.CommandErrorEvent) -> None: + error = event.exception if isinstance(error, lightbulb.CommandNotFound): return @@ -32,7 +41,9 @@ async def on_error(event: lightbulb.CommandErrorEvent) -> None: color=EmbedColors.ALERT, description=_message, ) - return await event.context.respond(embed=embed) + return await event.context.respond( + embed=embed, flags=hikari.MessageFlag.EPHEMERAL + ) if isinstance(error, lightbulb.CommandIsOnCooldown): embed = hikari.Embed( @@ -40,7 +51,9 @@ async def on_error(event: lightbulb.CommandErrorEvent) -> None: color=EmbedColors.ALERT, description=f"This command is on cooldown, please retry in {math.ceil(error.retry_after)}s.", ) - return await event.context.respond(embed=embed) + return await event.context.respond( + embed=embed, flags=hikari.MessageFlag.EPHEMERAL + ) if isinstance(error, lightbulb.NotEnoughArguments): return await event.bot.help_command.send_command_help( @@ -63,10 +76,15 @@ async def on_error(event: lightbulb.CommandErrorEvent) -> None: color=EmbedColors.ALERT, description=_message, ) - return await event.context.respond(embed=embed) + return await event.context.respond( + embed=embed, flags=hikari.MessageFlag.EPHEMERAL + ) title = " ".join(re.compile(r"[A-Z][a-z]*").findall(error.__class__.__name__)) await event.context.respond( - embed=hikari.Embed(title=title, description=str(error), color=EmbedColors.ALERT) + embed=hikari.Embed( + title=title, description=str(error), color=EmbedColors.ALERT + ), + flags=hikari.MessageFlag.EPHEMERAL, ) raise error From fe1f71c80e1435d516474f664acb9737f20f0083 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:51:42 +0545 Subject: [PATCH 04/44] feat: add 'get' function returns the first element in the iterable that meets all the traits passed in attrs. --- peacebot/core/utils/__init__.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 peacebot/core/utils/__init__.py diff --git a/peacebot/core/utils/__init__.py b/peacebot/core/utils/__init__.py new file mode 100644 index 0000000..4b6f15b --- /dev/null +++ b/peacebot/core/utils/__init__.py @@ -0,0 +1,33 @@ +import typing as t +from operator import attrgetter + +_ValueT = t.TypeVar("_ValueT") +T = t.TypeVar("T") + + +def get(iterable: t.Iterable[T], **attrs: t.Any) -> t.Optional[T]: + """A helper that returns the first element in the iterable that meets + all the traits passed in ``attrs``. + Args: + iterable (Iterable): An iterable to search through. + **attrs (Any): Keyword arguments that denote attributes to search with. + """ + attrget = attrgetter + + # Special case the single element call + if len(attrs) == 1: + k, v = attrs.popitem() + pred = attrget(k.replace("__", ".")) + for elem in iterable: + if pred(elem) == v: + return elem + return None + + converted = [ + (attrget(attr.replace("__", ".")), value) for attr, value in attrs.items() + ] + + for elem in iterable: + if all(pred(elem) == value for pred, value in converted): + return elem + return None From ab24b71852d31b4765108953d3e3df0d86c36777 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:52:15 +0545 Subject: [PATCH 05/44] feat: add '__init__' for Moderation folder --- peacebot/core/plugins/Moderation/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 peacebot/core/plugins/Moderation/__init__.py diff --git a/peacebot/core/plugins/Moderation/__init__.py b/peacebot/core/plugins/Moderation/__init__.py new file mode 100644 index 0000000..e69de29 From 7b060931c5afd6cf6adb1109fbdc00c82601d5dc Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:52:41 +0545 Subject: [PATCH 06/44] feat: add helper commands to assist moderation commands in running --- .../core/plugins/Moderation/mod_helpers.py | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 peacebot/core/plugins/Moderation/mod_helpers.py diff --git a/peacebot/core/plugins/Moderation/mod_helpers.py b/peacebot/core/plugins/Moderation/mod_helpers.py new file mode 100644 index 0000000..4d89f88 --- /dev/null +++ b/peacebot/core/plugins/Moderation/mod_helpers.py @@ -0,0 +1,167 @@ +from datetime import datetime + +import hikari +import lightbulb + +from models import ModerationRoles +from peacebot.core.utils.embed_colors import EmbedColors +from peacebot.core.utils.permissions import PermissionsError + +mod_helper = lightbulb.Plugin( + "Moderation Helper", + "Helper Commands that assist in running of moderation commands.", +) +mod_helper.add_checks( + lightbulb.has_guild_permissions( + perm1=hikari.Permissions.MANAGE_GUILD, + ) +) + + +@mod_helper.command +@lightbulb.command("role", "Setup Moderation roles for the server") +@lightbulb.implements(lightbulb.SlashCommandGroup, lightbulb.PrefixCommandGroup) +async def role_command(ctx: lightbulb.Context) -> None: + await ctx.bot.help_command.send_group_help(ctx, ctx.command) + + +@role_command.child +@lightbulb.option( + "role", "The role to set as general moderation role", type=hikari.Role +) +@lightbulb.command( + "moderation", + "Setup General moderation role for the server[Example: /role moderation @Staff]", +) +@lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) +async def moderation_role_command(ctx: lightbulb.Context) -> None: + role: hikari.Role = ctx.options.role + model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) + if model is None: + await ModerationRoles.create(guild_id=ctx.guild_id, moderation_role=role.id) + else: + model.moderation_role = role.id + await model.save() + + await ctx.respond( + embed=hikari.Embed( + title=f"Moderation Role - {ctx.get_guild().name}", + description=f"General Moderation role was set to {role.mention}", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ), + flags=hikari.MessageFlag.EPHEMERAL, + ) + + +@role_command.child +@lightbulb.option("role", "The role to set as mod role", type=hikari.Role) +@lightbulb.command( + "mod", "Setup Mod role for the server[Example: /role mod @Moderator]" +) +@lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) +async def mod_role_command(ctx: lightbulb.Context) -> None: + role: hikari.Role = ctx.options.role + model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) + if model is None: + await ModerationRoles.create(guild_id=ctx.guild_id, mod_role=role.id) + else: + model.mod_role = role.id + await model.save() + await ctx.respond( + embed=hikari.Embed( + title=f"Mod Role - {ctx.get_guild().name}", + description=f"Moderation role was set to {role.mention}", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ), + flags=hikari.MessageFlag.EPHEMERAL, + ) + + +@role_command.child +@lightbulb.option("role", "The role to set as admin role", type=hikari.Role) +@lightbulb.command( + "admin", "Setup Admin role for the server[Example: /role admin @Admin]" +) +@lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) +async def admin_role_command(ctx: lightbulb.Context) -> None: + role: hikari.Role = ctx.options.role + model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) + if model is None: + await ModerationRoles.create(guild_id=ctx.guild_id, admin_role=role.id) + else: + model.admin_role = role.id + await model.save() + await ctx.respond( + embed=hikari.Embed( + title=f"Admin Role - {ctx.get_guild().name}", + description=f"Admin role was set to {role.mention}", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ), + flags=hikari.MessageFlag.EPHEMERAL, + ) + + +@role_command.child +@lightbulb.command("list", "List all the moderation roles") +@lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) +async def list_command(ctx: lightbulb.Context) -> None: + model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) + if model is None: + await ctx.bot.help_command.send_group_help(ctx, ctx.command) + raise PermissionsError("No Moderation roles have been setup for the server!") + + embed = ( + hikari.Embed( + title=f"Moderation Roles - {ctx.get_guild().name}", + description="", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ) + .add_field( + name="General Moderation Role", + value=f"<@&{model.moderation_role}>" if model.moderation_role else "None", + inline=True, + ) + .add_field( + name="Mod Role", + value=f"<@&{model.mod_role}>" if model.mod_role else "None", + inline=True, + ) + .add_field( + name="Admin Role", + value=f"<@&{model.admin_role}>" if model.admin_role else "None", + inline=True, + ) + ) + await ctx.respond(embed=embed) + + +@role_command.child +@lightbulb.command("clear", "Clear all the moderation roles") +@lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) +async def clear_command(ctx: lightbulb.Context) -> None: + model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) + if model is None: + await ctx.bot.help_command.send_group_help(ctx, ctx.command) + raise PermissionsError("No Moderation roles have been setup for the server!") + + await model.delete() + await ctx.respond( + embed=hikari.Embed( + title=f"Moderation Roles - {ctx.get_guild().name}", + description="All moderation roles have been cleared", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ) + ) + + +def load(bot: lightbulb.BotApp) -> None: + bot.add_plugin(mod_helper) + + +def unload(bot: lightbulb.BotApp) -> None: + bot.remove_plugin(mod_helper) From 9161e9e449194bfd81842b511c82e0fdc78f8caf Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Wed, 26 Jan 2022 20:53:03 +0545 Subject: [PATCH 07/44] feat: add 'timeout' command --- peacebot/core/plugins/Moderation/mod.py | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 peacebot/core/plugins/Moderation/mod.py diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py new file mode 100644 index 0000000..6b15389 --- /dev/null +++ b/peacebot/core/plugins/Moderation/mod.py @@ -0,0 +1,49 @@ +from datetime import datetime, timedelta, timezone + +import hikari +import lightbulb + +from peacebot.core.utils.embed_colors import EmbedColors +from peacebot.core.utils.errors import ModerationError +from peacebot.core.utils.helper_functions import convert_time +from peacebot.core.utils.permissions import moderation_role_check + +mod_plugin = lightbulb.Plugin("Mod", "Commands to be used by the Moderators") + + +@mod_plugin.command +@lightbulb.option("reason", "Reason for the timeout", type=str) +@lightbulb.option("time", "The duration of timeout (Eg. 10s, 3d, 5d)", type=str) +@lightbulb.option("member", "The member to timeout", type=hikari.Member) +@lightbulb.command("timeout", "Timeout a member from the server") +@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@moderation_role_check +async def timeout_command(ctx: lightbulb.Context) -> None: + member: hikari.Member = ctx.options.member + now = datetime.now(timezone.utc) + time_seconds = convert_time(ctx.options.time) + then = now + timedelta(seconds=time_seconds) + if (then - now).days > 28: + raise ModerationError("You cannot timeout members for more than 28 days!") + await member.edit(communication_disabled_until=then, reason=ctx.options.reason) + embed = ( + hikari.Embed( + description=f"🔇Timed Out {member}\n**Reason:** {ctx.options.reason}", + color=EmbedColors.ERROR, + timestamp=datetime.now().astimezone(), + ) + .set_author( + name=f"{ctx.author}(ID {ctx.author.id})", icon=ctx.author.avatar_url + ) + .set_footer(text=f"Time: {ctx.options.time}") + .set_thumbnail(member.avatar_url) + ) + await ctx.respond(embed=embed) + + +def load(bot: lightbulb.BotApp) -> None: + bot.add_plugin(mod_plugin) + + +def unload(bot: lightbulb.BotApp) -> None: + bot.remove_plugin(mod_plugin) From 3ec7bb873fdbc17bbc1f41f6419cdbb08367e91b Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 11:51:00 +0545 Subject: [PATCH 08/44] refactor: changed command type of timeout command Changes timeout command from individual to a group command and add timeout disable function --- peacebot/core/plugins/Moderation/mod.py | 41 ++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index 6b15389..19cd779 100644 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -1,4 +1,6 @@ from datetime import datetime, timedelta, timezone +from operator import mod +from time import time import hikari import lightbulb @@ -12,13 +14,21 @@ @mod_plugin.command +@lightbulb.command("timeout", "Group that consists of the timeout commands") +@lightbulb.implements(lightbulb.SlashCommandGroup, lightbulb.PrefixCommandGroup) +@moderation_role_check +async def timeout(ctx: lightbulb.Context) -> None: + await ctx.bot.help_command.send_group_help(ctx, ctx.command) + + +@timeout.child @lightbulb.option("reason", "Reason for the timeout", type=str) @lightbulb.option("time", "The duration of timeout (Eg. 10s, 3d, 5d)", type=str) @lightbulb.option("member", "The member to timeout", type=hikari.Member) -@lightbulb.command("timeout", "Timeout a member from the server") -@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@lightbulb.command("enable", "Timeout a member from the server") +@lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) @moderation_role_check -async def timeout_command(ctx: lightbulb.Context) -> None: +async def timeout_enable_command(ctx: lightbulb.Context) -> None: member: hikari.Member = ctx.options.member now = datetime.now(timezone.utc) time_seconds = convert_time(ctx.options.time) @@ -28,7 +38,7 @@ async def timeout_command(ctx: lightbulb.Context) -> None: await member.edit(communication_disabled_until=then, reason=ctx.options.reason) embed = ( hikari.Embed( - description=f"🔇Timed Out {member}\n**Reason:** {ctx.options.reason}", + description=f"🔇Timed Out -> {member}\n**Reason:** {ctx.options.reason}", color=EmbedColors.ERROR, timestamp=datetime.now().astimezone(), ) @@ -41,6 +51,29 @@ async def timeout_command(ctx: lightbulb.Context) -> None: await ctx.respond(embed=embed) +@timeout.child +@lightbulb.option("reason", "Reason to remove timeout") +@lightbulb.option("member", "Member to remove timeout from", type=hikari.Member) +@lightbulb.command("disable", "Remove timeout from a member") +@lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) +async def disable_timeout_command(ctx: lightbulb.Context) -> None: + member: hikari.Member = ctx.options.member + now = datetime.now(timezone.utc) + await member.edit(communication_disabled_until=now, reason=ctx.options.reason) + embed = ( + hikari.Embed( + description=f"🔊 Removed TimeOut -> {member}\n**Reason:** {ctx.options.reason}", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ) + .set_author( + name=f"{ctx.author}(ID {ctx.author.id})", icon=ctx.author.avatar_url + ) + .set_thumbnail(member.avatar_url) + ) + await ctx.respond(embed=embed) + + def load(bot: lightbulb.BotApp) -> None: bot.add_plugin(mod_plugin) From 77e4a8096cc9a1dd2b9c21c795a9c92fd36ae37c Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 11:52:31 +0545 Subject: [PATCH 09/44] refactor: remove unnecessary imports --- peacebot/core/plugins/Moderation/mod.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index 19cd779..d05576b 100644 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -1,6 +1,4 @@ from datetime import datetime, timedelta, timezone -from operator import mod -from time import time import hikari import lightbulb From 02615853e7620b8400ecef66136d7db1be123035 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 11:55:44 +0545 Subject: [PATCH 10/44] feat: add models for setting staff roles of the server --- models.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/models.py b/models.py index f0c6395..1d413d7 100644 --- a/models.py +++ b/models.py @@ -63,3 +63,17 @@ class Meta: table = "autoresponses" table_description = "Represents the autoresponses for each GuildModel" unique_together = (("guild", "trigger"),) + + +class ModerationRoles(CustomModel): + id = fields.IntField(pk=True) + admin_role = fields.BigIntField(description="ID of the Admin role", null=True) + mod_role = fields.BigIntField(description="ID of the Mod role", null=True) + moderation_role = fields.BigIntField( + description="ID of the General Moderation Role", null=True + ) + guild_id = fields.BigIntField(description="Guild ID") + + class Meta: + table = "staff_roles" + table_description = "Stores the roles for the moderation" From 5e9b54480dc69f3851f57f12469f18931b3251c9 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 14:52:24 +0545 Subject: [PATCH 11/44] feat: add 'case search' 'case list' and started logging moderation actions --- peacebot/core/plugins/Moderation/mod.py | 94 ++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index d05576b..cf483f0 100644 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -1,12 +1,16 @@ from datetime import datetime, timedelta, timezone +from operator import mod import hikari import lightbulb +from lightbulb.utils import nav +from models import ModLogs from peacebot.core.utils.embed_colors import EmbedColors from peacebot.core.utils.errors import ModerationError from peacebot.core.utils.helper_functions import convert_time -from peacebot.core.utils.permissions import moderation_role_check +from peacebot.core.utils.permissions import mod_logs_check, moderation_role_check +from peacebot.core.utils.utilities import _chunk mod_plugin = lightbulb.Plugin("Mod", "Commands to be used by the Moderators") @@ -28,6 +32,7 @@ async def timeout(ctx: lightbulb.Context) -> None: @moderation_role_check async def timeout_enable_command(ctx: lightbulb.Context) -> None: member: hikari.Member = ctx.options.member + mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) time_seconds = convert_time(ctx.options.time) then = now + timedelta(seconds=time_seconds) @@ -46,7 +51,18 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: .set_footer(text=f"Time: {ctx.options.time}") .set_thumbnail(member.avatar_url) ) - await ctx.respond(embed=embed) + await mod_logs.send(embed=embed) + response = await ctx.respond(embed=embed) + message_link = (await response.message()).make_link(ctx.guild_id) + await ModLogs.create( + guild_id=ctx.guild_id, + moderator=f"<@{ctx.author.id}>", + target=f"<@{member.id}>", + reason=ctx.options.reason, + message=message_link, + channel=f"<#{ctx.channel_id}>", + type="TimeOut Enable", + ) @timeout.child @@ -56,6 +72,7 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: @lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) async def disable_timeout_command(ctx: lightbulb.Context) -> None: member: hikari.Member = ctx.options.member + mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) await member.edit(communication_disabled_until=now, reason=ctx.options.reason) embed = ( @@ -69,9 +86,82 @@ async def disable_timeout_command(ctx: lightbulb.Context) -> None: ) .set_thumbnail(member.avatar_url) ) + await mod_logs.send(embed=embed) + response = await ctx.respond(embed=embed) + message_link = (await response.message()).make_link(ctx.guild_id) + await ModLogs.create( + guild_id=ctx.guild_id, + moderator=f"<@{ctx.author.id}>", + target=f"<@{member.id}>", + reason=ctx.options.reason, + message=message_link, + channel=f"<#{ctx.channel_id}>", + type="Timeout Disable", + ) + + +@mod_plugin.command +@lightbulb.command("case", "Group for case commands") +@lightbulb.implements(lightbulb.SlashCommandGroup, lightbulb.PrefixCommandGroup) +async def case_command(ctx: lightbulb.Context) -> None: + await ctx.bot.help_command.send_group_help(ctx, ctx.command) + + +@case_command.child +@lightbulb.option("case_id", "Case ID to look for") +@lightbulb.command("search", "Get a specific case") +@lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) +async def case_search_command(ctx: lightbulb.Context) -> None: + model = await ModLogs.get_or_none(guild_id=ctx.guild_id, id=ctx.options.case_id) + if model is None: + raise ModerationError("No case found with that ID.") + embed = hikari.Embed( + title=f"{model.type} Case | No. {model.id}", + description=f"[Jump to Message!]({model.message})", + color=EmbedColors.INFO, + ) + fields: list[tuple[str, str | int, bool]] = [ + ("Moderator", model.moderator, True), + ("Target", model.target, True), + ("Reason", model.reason, True), + ("Channel", model.channel, True), + ("Guild ID", model.guild_id, True), + ( + "Time of Action", + f" • ", + False, + ), + ] + for name, value, inline in fields: + embed.add_field(name=name, value=value, inline=inline) + await ctx.respond(embed=embed) +@case_command.child +@lightbulb.command("list", "List all the Moderation Cases") +@lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) +@moderation_role_check +async def case_list_command(ctx: lightbulb.Context) -> None: + case_model = await ModLogs.filter(guild_id=ctx.guild_id) + if not len(case_model): + raise ModerationError("No Cases could be found for the guild!") + + cases = [ + f"#{model.id} - -> {model.moderator}\n**Type**: ```{model.type}```" + for (_, model) in enumerate(case_model) + ] + fields = ( + hikari.Embed( + title="List of Cases", description="\n".join(case), color=EmbedColors.INFO + ).set_footer(text=f"Page: {index + 1}") + for index, case in enumerate(_chunk(cases, 5)) + ) + + navigator = nav.ButtonNavigator(iter(fields)) + await navigator.run(ctx) + + def load(bot: lightbulb.BotApp) -> None: bot.add_plugin(mod_plugin) From 4c6a46f70879fbf624b0d7c8e8eb5901724ec09e Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 14:53:01 +0545 Subject: [PATCH 12/44] refactor: change role commands to config command and add a command to set modlogs --- .../core/plugins/Moderation/mod_helpers.py | 39 +++++++++++++++---- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod_helpers.py b/peacebot/core/plugins/Moderation/mod_helpers.py index 4d89f88..3a3f773 100644 --- a/peacebot/core/plugins/Moderation/mod_helpers.py +++ b/peacebot/core/plugins/Moderation/mod_helpers.py @@ -3,7 +3,7 @@ import hikari import lightbulb -from models import ModerationRoles +from models import GuildModel, ModerationRoles from peacebot.core.utils.embed_colors import EmbedColors from peacebot.core.utils.permissions import PermissionsError @@ -19,13 +19,13 @@ @mod_helper.command -@lightbulb.command("role", "Setup Moderation roles for the server") +@lightbulb.command("config", "Setup Moderation roles for the server") @lightbulb.implements(lightbulb.SlashCommandGroup, lightbulb.PrefixCommandGroup) -async def role_command(ctx: lightbulb.Context) -> None: +async def config_command(ctx: lightbulb.Context) -> None: await ctx.bot.help_command.send_group_help(ctx, ctx.command) -@role_command.child +@config_command.child @lightbulb.option( "role", "The role to set as general moderation role", type=hikari.Role ) @@ -54,7 +54,7 @@ async def moderation_role_command(ctx: lightbulb.Context) -> None: ) -@role_command.child +@config_command.child @lightbulb.option("role", "The role to set as mod role", type=hikari.Role) @lightbulb.command( "mod", "Setup Mod role for the server[Example: /role mod @Moderator]" @@ -79,7 +79,7 @@ async def mod_role_command(ctx: lightbulb.Context) -> None: ) -@role_command.child +@config_command.child @lightbulb.option("role", "The role to set as admin role", type=hikari.Role) @lightbulb.command( "admin", "Setup Admin role for the server[Example: /role admin @Admin]" @@ -104,7 +104,7 @@ async def admin_role_command(ctx: lightbulb.Context) -> None: ) -@role_command.child +@config_command.child @lightbulb.command("list", "List all the moderation roles") @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) async def list_command(ctx: lightbulb.Context) -> None: @@ -139,7 +139,7 @@ async def list_command(ctx: lightbulb.Context) -> None: await ctx.respond(embed=embed) -@role_command.child +@config_command.child @lightbulb.command("clear", "Clear all the moderation roles") @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) async def clear_command(ctx: lightbulb.Context) -> None: @@ -159,6 +159,29 @@ async def clear_command(ctx: lightbulb.Context) -> None: ) +@config_command.child +@lightbulb.option( + "channel", "The channel to set as mod-logs channel", type=hikari.GuildChannel +) +@lightbulb.command("modlog", "Set mod-logs for the server") +@lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) +async def modlog_command(ctx: lightbulb.Context) -> None: + channel: hikari.GuildTextChannel = ctx.options.channel + model = await GuildModel.get_or_none(id=ctx.guild_id) + if model is None: + raise PermissionsError("Guild Model not found for the server.") + model.mod_log_channel = channel.id + await model.save() + await ctx.respond( + embed=hikari.Embed( + title=f"Config [Mod Log] - {ctx.get_guild().name}", + description=f"<#{channel.id}> set to Mod Logs channel for the guild!", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), + ) + ) + + def load(bot: lightbulb.BotApp) -> None: bot.add_plugin(mod_helper) From 2289c2df85d6dfce76246554889d8475f89df56c Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 14:53:26 +0545 Subject: [PATCH 13/44] feat: add check for mod logs --- peacebot/core/utils/permissions.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py index 2932194..2fe5583 100644 --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -1,7 +1,7 @@ import hikari import lightbulb -from models import ModerationRoles +from models import GuildModel, ModerationRoles from . import get @@ -111,3 +111,14 @@ async def higher_role_check(author: hikari.Member, member: hikari.Member) -> Non raise PermissionsError( "You cannot run moderation commands on this user, as they have got similar permissions and roles to yours." ) + + +async def mod_logs_check(ctx: lightbulb.Context) -> hikari.GuildChannel: + model = await GuildModel.get_or_none(id=ctx.guild_id) + if model is None or model.mod_log_channel is None: + raise PermissionsError( + f"No Mod Logs channel found for the guild\nUse `/config modlog` to set." + ) + channel = (ctx.get_guild()).get_channel(model.mod_log_channel) + assert channel is not None + return channel From d37b7308267928c5c072bc95c814a2344e763405 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 14:54:17 +0545 Subject: [PATCH 14/44] refactor: remove unnecessary imports --- peacebot/core/plugins/Moderation/mod.py | 1 - 1 file changed, 1 deletion(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index cf483f0..1bc84f1 100644 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -1,5 +1,4 @@ from datetime import datetime, timedelta, timezone -from operator import mod import hikari import lightbulb From 9a8657c31676cec816f6fc769913a416f76a6720 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 14:58:44 +0545 Subject: [PATCH 15/44] refactor: move all the time functions from 'time.py' to 'helper_functions.py' --- peacebot/core/utils/helper_functions.py | 82 +++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/peacebot/core/utils/helper_functions.py b/peacebot/core/utils/helper_functions.py index 245f358..c09e7be 100644 --- a/peacebot/core/utils/helper_functions.py +++ b/peacebot/core/utils/helper_functions.py @@ -1,7 +1,9 @@ import functools import logging +import math import re import typing as t +from datetime import datetime, timedelta import lightbulb from lightbulb import LightbulbError @@ -13,6 +15,22 @@ time_regex = re.compile("(?:(\d{1,5})(h|s|m|d|w))+?") time_dict = {"h": 3600, "s": 1, "m": 60, "d": 86400, "w": 604800} +ordinal = lambda n: "%d%s" % ( + n, + "tsnrhtdd"[(math.floor(n / 10) % 10 != 1) * (n % 10 < 4) * n % 10 :: 4], +) + + +steps = dict( + year=timedelta(days=365), + week=timedelta(days=7), + day=timedelta(days=1), + hour=timedelta(hours=1), + minute=timedelta(minutes=1), + second=timedelta(seconds=1), + millisecond=timedelta(milliseconds=1), +) + class CommandError(LightbulbError): pass @@ -59,3 +77,67 @@ def convert_time(argument: str) -> float: raise HelpersError(f"{value} is not a number.") return time + + +def pretty_timedelta(td: timedelta) -> str: + """Returns a pretty string of a timedelta""" + + if not isinstance(td, timedelta): + raise ValueError("timedelta expected, '{}' given".format(type(td))) + + parts = [] + + for name, span in steps.items(): + if td >= span: + count = int(td / span) + td -= count * span + parts.append("{} {}{}".format(count, name, "s" if count > 1 else "")) + if len(parts) >= 2 or name == "second": + break + elif len(parts): + break + + return ", ".join(parts) + + +def pretty_seconds(s) -> str: + return pretty_timedelta(timedelta(seconds=s)) + + +def pretty_datetime(dt: datetime, ignore_time=False) -> str: + if not isinstance(dt, datetime): + raise ValueError("datetime expected, '{}' given".format(type(dt))) + + return "{0} {1}".format( + ordinal(int(dt.strftime("%d"))), + dt.strftime("%b %Y" + ("" if ignore_time else " %H:%M")), + ) + + +def time_mult_converter(mult: str) -> float: + try: + mult = float(mult) + except ValueError: + raise HelpersError("Argument has to be float.") + + if mult < 1.0: + raise HelpersError("Unit must be more than 1.") + + return mult + + +def timedelta_converter(unit: str): + unit = unit.lower() + + if unit in ("s", "sec", "secs", "second", "seconds"): + return timedelta(seconds=1) + elif unit in ("m", "min", "mins", "minute", "minutes"): + return timedelta(minutes=1) + elif unit in ("h", "hr", "hrs", "hour", "hours"): + return timedelta(hours=1) + elif unit in ("d", "day", "days"): + return timedelta(days=1) + elif unit in ("w", "wk", "week", "weeks"): + return timedelta(weeks=1) + else: + raise HelpersError("Unknown time type.") From f31a3fda3473be07534f5ab3f7187d253e00f372 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 14:59:06 +0545 Subject: [PATCH 16/44] refactor: delete 'time.py' --- peacebot/core/utils/time.py | 162 ------------------------------------ 1 file changed, 162 deletions(-) delete mode 100644 peacebot/core/utils/time.py diff --git a/peacebot/core/utils/time.py b/peacebot/core/utils/time.py deleted file mode 100644 index c74c67a..0000000 --- a/peacebot/core/utils/time.py +++ /dev/null @@ -1,162 +0,0 @@ -import math -import re -from datetime import datetime, timedelta - -import lightbulb - - -class TimeError(lightbulb.LightbulbError): - pass - - -time_regex = re.compile("(?:(\d{1,5})(h|s|m|d))+?") -time_dict = {"h": 3600, "s": 1, "m": 60, "d": 86400} - -ordinal = lambda n: "%d%s" % ( - n, - "tsnrhtdd"[(math.floor(n / 10) % 10 != 1) * (n % 10 < 4) * n % 10 :: 4], -) - - -steps = dict( - year=timedelta(days=365), - week=timedelta(days=7), - day=timedelta(days=1), - hour=timedelta(hours=1), - minute=timedelta(minutes=1), - second=timedelta(seconds=1), - millisecond=timedelta(milliseconds=1), -) - -steps_shortened = dict( - y=timedelta(days=365), - w=timedelta(days=7), - d=timedelta(days=1), - h=timedelta(hours=1), - m=timedelta(minutes=1), - s=timedelta(seconds=1), - ms=timedelta(milliseconds=1), -) - - -def pretty_timedelta_shortened(td: timedelta) -> str: - """Returns a pretty shortened string of a timedelta""" - - if not isinstance(td, timedelta): - raise ValueError(f"timedelta expected, '{type(td)}' given.") - - parts = [] - for name, span in steps_shortened.items(): - if td >= span: - count = int(td / span) - td -= count * span - parts.append("{}{}".format(count, name)) - if len(parts) >= 2 or name == "s": - break - elif len(parts): - break - - return " : ".join(parts) - - -def pretty_timedelta(td: timedelta) -> str: - """Returns a pretty string of a timedelta""" - - if not isinstance(td, timedelta): - raise ValueError("timedelta expected, '{}' given".format(type(td))) - - parts = [] - - for name, span in steps.items(): - if td >= span: - count = int(td / span) - td -= count * span - parts.append("{} {}{}".format(count, name, "s" if count > 1 else "")) - if len(parts) >= 2 or name == "second": - break - elif len(parts): - break - - return ", ".join(parts) - - -def pretty_seconds_shortened(s) -> str: - return pretty_timedelta_shortened(timedelta(seconds=s)) - - -def pretty_seconds(s) -> str: - return pretty_timedelta(timedelta(seconds=s)) - - -def pretty_datetime(dt: datetime, ignore_time=False) -> str: - if not isinstance(dt, datetime): - raise ValueError("datetime expected, '{}' given".format(type(dt))) - - return "{0} {1}".format( - ordinal(int(dt.strftime("%d"))), - dt.strftime("%b %Y" + ("" if ignore_time else " %H:%M")), - ) - - -class TimeMultConverter(lightbulb.converters.BaseConverter): - async def convert(self, _: lightbulb.context.Context, mult: str) -> float: - try: - mult = float(mult) - except ValueError: - raise TimeError("Argument has to be float.") - - if mult < 1.0: - raise TimeError("Unit must be more than 1.") - - return mult - - -class TimeDeltaConverter(lightbulb.converters.BaseConverter): - async def convert(self, _: lightbulb.context.Context, unit: str): - unit = unit.lower() - - if unit in ("s", "sec", "secs", "second", "seconds"): - return timedelta(seconds=1) - elif unit in ("m", "min", "mins", "minute", "minutes"): - return timedelta(minutes=1) - elif unit in ("h", "hr", "hrs", "hour", "hours"): - return timedelta(hours=1) - elif unit in ("d", "day", "days"): - return timedelta(days=1) - elif unit in ("w", "wk", "week", "weeks"): - return timedelta(weeks=1) - else: - raise TimeError("Unknown time type.") - - -class TimeConverter(lightbulb.converters.BaseConverter): - async def convert(self, _: lightbulb.context.Context, argument: str) -> float: - """Function that converts given time into seconds. - Parameters - ---------- - ctx : lightbulb.context.Context - Context of the command invokation. - argument : str - Time to be converted - Returns - ------- - float - Time in seconds. - Raises - ------ - TimeError - When the values are wrong and when the input doesn't match the input regex. - """ - args = argument.lower() - matches = re.findall(time_regex, args) - time = 0 - for v, k in matches: - try: - time += time_dict[k] * float(v) - except KeyError: - raise TimeError( - "{} is an invalid time-key! h/m/s/d are valid!".format(k) - ) - except ValueError: - raise TimeError("{} is not a number!".format(v)) - return time From 312b718ad72c4a431db8fde05bf3e4ec8072f27d Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 15:01:41 +0545 Subject: [PATCH 17/44] refactor: remove 'get' function from __init__ --- peacebot/core/utils/__init__.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/peacebot/core/utils/__init__.py b/peacebot/core/utils/__init__.py index 4b6f15b..e69de29 100644 --- a/peacebot/core/utils/__init__.py +++ b/peacebot/core/utils/__init__.py @@ -1,33 +0,0 @@ -import typing as t -from operator import attrgetter - -_ValueT = t.TypeVar("_ValueT") -T = t.TypeVar("T") - - -def get(iterable: t.Iterable[T], **attrs: t.Any) -> t.Optional[T]: - """A helper that returns the first element in the iterable that meets - all the traits passed in ``attrs``. - Args: - iterable (Iterable): An iterable to search through. - **attrs (Any): Keyword arguments that denote attributes to search with. - """ - attrget = attrgetter - - # Special case the single element call - if len(attrs) == 1: - k, v = attrs.popitem() - pred = attrget(k.replace("__", ".")) - for elem in iterable: - if pred(elem) == v: - return elem - return None - - converted = [ - (attrget(attr.replace("__", ".")), value) for attr, value in attrs.items() - ] - - for elem in iterable: - if all(pred(elem) == value for pred, value in converted): - return elem - return None From 17b9e746015dc48c729d9bf1129dab807cdf2eb4 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 15:02:10 +0545 Subject: [PATCH 18/44] refactor: move 'get' function from __init__.py to helper_functions.py --- peacebot/core/utils/helper_functions.py | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/peacebot/core/utils/helper_functions.py b/peacebot/core/utils/helper_functions.py index c09e7be..c600eb9 100644 --- a/peacebot/core/utils/helper_functions.py +++ b/peacebot/core/utils/helper_functions.py @@ -4,12 +4,16 @@ import re import typing as t from datetime import datetime, timedelta +from operator import attrgetter import lightbulb from lightbulb import LightbulbError from .errors import HelpersError +_ValueT = t.TypeVar("_ValueT") +T = t.TypeVar("T") + logger = logging.getLogger(__name__) time_regex = re.compile("(?:(\d{1,5})(h|s|m|d|w))+?") @@ -141,3 +145,31 @@ def timedelta_converter(unit: str): return timedelta(weeks=1) else: raise HelpersError("Unknown time type.") + + +def get(iterable: t.Iterable[T], **attrs: t.Any) -> t.Optional[T]: + """A helper that returns the first element in the iterable that meets + all the traits passed in ``attrs``. + Args: + iterable (Iterable): An iterable to search through. + **attrs (Any): Keyword arguments that denote attributes to search with. + """ + attrget = attrgetter + + # Special case the single element call + if len(attrs) == 1: + k, v = attrs.popitem() + pred = attrget(k.replace("__", ".")) + for elem in iterable: + if pred(elem) == v: + return elem + return None + + converted = [ + (attrget(attr.replace("__", ".")), value) for attr, value in attrs.items() + ] + + for elem in iterable: + if all(pred(elem) == value for pred, value in converted): + return elem + return None From a278343a55495730a7137ab6b03f53dbd84a685d Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 15:24:27 +0545 Subject: [PATCH 19/44] refactor: add a way to remove modlog channel --- .../core/plugins/Moderation/mod_helpers.py | 68 +++++++++++-------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod_helpers.py b/peacebot/core/plugins/Moderation/mod_helpers.py index 3a3f773..264f62a 100644 --- a/peacebot/core/plugins/Moderation/mod_helpers.py +++ b/peacebot/core/plugins/Moderation/mod_helpers.py @@ -5,7 +5,7 @@ from models import GuildModel, ModerationRoles from peacebot.core.utils.embed_colors import EmbedColors -from peacebot.core.utils.permissions import PermissionsError +from peacebot.core.utils.permissions import PermissionsError, mod_logs_check mod_helper = lightbulb.Plugin( "Moderation Helper", @@ -45,7 +45,7 @@ async def moderation_role_command(ctx: lightbulb.Context) -> None: await ctx.respond( embed=hikari.Embed( - title=f"Moderation Role - {ctx.get_guild().name}", + title=f"Config [Moderation Role] - {ctx.get_guild().name}", description=f"General Moderation role was set to {role.mention}", color=EmbedColors.SUCCESS, timestamp=datetime.now().astimezone(), @@ -70,7 +70,7 @@ async def mod_role_command(ctx: lightbulb.Context) -> None: await model.save() await ctx.respond( embed=hikari.Embed( - title=f"Mod Role - {ctx.get_guild().name}", + title=f"Config [Mod Role] - {ctx.get_guild().name}", description=f"Moderation role was set to {role.mention}", color=EmbedColors.SUCCESS, timestamp=datetime.now().astimezone(), @@ -95,7 +95,7 @@ async def admin_role_command(ctx: lightbulb.Context) -> None: await model.save() await ctx.respond( embed=hikari.Embed( - title=f"Admin Role - {ctx.get_guild().name}", + title=f"Config [Admin Role] - {ctx.get_guild().name}", description=f"Admin role was set to {role.mention}", color=EmbedColors.SUCCESS, timestamp=datetime.now().astimezone(), @@ -105,37 +105,33 @@ async def admin_role_command(ctx: lightbulb.Context) -> None: @config_command.child -@lightbulb.command("list", "List all the moderation roles") +@lightbulb.command("list", "List all the config variables") @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) async def list_command(ctx: lightbulb.Context) -> None: + mod_logs = await mod_logs_check(ctx) model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) if model is None: await ctx.bot.help_command.send_group_help(ctx, ctx.command) raise PermissionsError("No Moderation roles have been setup for the server!") - embed = ( - hikari.Embed( - title=f"Moderation Roles - {ctx.get_guild().name}", - description="", - color=EmbedColors.SUCCESS, - timestamp=datetime.now().astimezone(), - ) - .add_field( - name="General Moderation Role", - value=f"<@&{model.moderation_role}>" if model.moderation_role else "None", - inline=True, - ) - .add_field( - name="Mod Role", - value=f"<@&{model.mod_role}>" if model.mod_role else "None", - inline=True, - ) - .add_field( - name="Admin Role", - value=f"<@&{model.admin_role}>" if model.admin_role else "None", - inline=True, - ) + embed = hikari.Embed( + title=f"Config List - {ctx.get_guild().name}", + description="", + color=EmbedColors.SUCCESS, + timestamp=datetime.now().astimezone(), ) + fields: list[tuple[str, int, bool]] = [ + ("Mod Logs Channel", f"<#{mod_logs.id}>", False), + ( + "General Moderation Role", + f"<@&{model.moderation_role}>" if model.moderation_role else "None", + False, + ), + ("Mod Role", f"<@&{model.mod_role}>" if model.mod_role else "None", True), + ("Admin Role", f"<@&{model.admin_role}>" if model.admin_role else "None", True), + ] + for name, value, inline in fields: + embed.add_field(name=name, value=value, inline=inline) await ctx.respond(embed=embed) @@ -151,7 +147,7 @@ async def clear_command(ctx: lightbulb.Context) -> None: await model.delete() await ctx.respond( embed=hikari.Embed( - title=f"Moderation Roles - {ctx.get_guild().name}", + title=f"Config [Moderation Roles] - {ctx.get_guild().name}", description="All moderation roles have been cleared", color=EmbedColors.SUCCESS, timestamp=datetime.now().astimezone(), @@ -161,15 +157,27 @@ async def clear_command(ctx: lightbulb.Context) -> None: @config_command.child @lightbulb.option( - "channel", "The channel to set as mod-logs channel", type=hikari.GuildChannel + "channel", + "The channel to set as mod-logs channel", + type=hikari.TextableChannel, + required=False, ) @lightbulb.command("modlog", "Set mod-logs for the server") @lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) async def modlog_command(ctx: lightbulb.Context) -> None: - channel: hikari.GuildTextChannel = ctx.options.channel + channel: hikari.GuildTextChannel | None = ctx.options.channel model = await GuildModel.get_or_none(id=ctx.guild_id) if model is None: raise PermissionsError("Guild Model not found for the server.") + + if channel is None: + model.mod_log_channel = None + await model.save() + return await ctx.respond( + "Removed Mod Logs channel for the guild!", + flags=hikari.MessageFlag.EPHEMERAL, + ) + model.mod_log_channel = channel.id await model.save() await ctx.respond( From 297113f8f071bd918351853f13cb2dc5595e51de Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 16:56:50 +0545 Subject: [PATCH 20/44] feat: add 'delete_moderation_roles' function in assisting in deleting moderation roles --- peacebot/core/utils/permissions.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py index 2fe5583..823469a 100644 --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -1,9 +1,7 @@ import hikari import lightbulb -from models import GuildModel, ModerationRoles - -from . import get +from models import GuildModel, ModerationRoles, ModLogs class PermissionsError(lightbulb.LightbulbError): @@ -122,3 +120,13 @@ async def mod_logs_check(ctx: lightbulb.Context) -> hikari.GuildChannel: channel = (ctx.get_guild()).get_channel(model.mod_log_channel) assert channel is not None return channel + + +async def delete_moderation_roles(model: ModerationRoles) -> None: + if ( + model.admin_role is None + and model.mod_role is None + and model.moderation_role is None + ): + return await model.delete() + pass From 2ac573f9ae3fba16936a5804199645bd0caabb6c Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 27 Jan 2022 16:58:34 +0545 Subject: [PATCH 21/44] refactor: remove 'config clear' command and made the roles deletable by passing no role in the config command --- .../core/plugins/Moderation/mod_helpers.py | 64 +++++++++++-------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod_helpers.py b/peacebot/core/plugins/Moderation/mod_helpers.py index 264f62a..8024cf2 100644 --- a/peacebot/core/plugins/Moderation/mod_helpers.py +++ b/peacebot/core/plugins/Moderation/mod_helpers.py @@ -5,7 +5,11 @@ from models import GuildModel, ModerationRoles from peacebot.core.utils.embed_colors import EmbedColors -from peacebot.core.utils.permissions import PermissionsError, mod_logs_check +from peacebot.core.utils.permissions import ( + PermissionsError, + delete_moderation_roles, + mod_logs_check, +) mod_helper = lightbulb.Plugin( "Moderation Helper", @@ -27,7 +31,10 @@ async def config_command(ctx: lightbulb.Context) -> None: @config_command.child @lightbulb.option( - "role", "The role to set as general moderation role", type=hikari.Role + "role", + "The role to set as general moderation role", + type=hikari.Role, + required=False, ) @lightbulb.command( "moderation", @@ -39,6 +46,13 @@ async def moderation_role_command(ctx: lightbulb.Context) -> None: model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) if model is None: await ModerationRoles.create(guild_id=ctx.guild_id, moderation_role=role.id) + elif role is None: + model.moderation_role = None + await model.save() + await delete_moderation_roles(model) + return await ctx.respond( + "Cleared Moderation role for the guild", flags=hikari.MessageFlag.EPHEMERAL + ) else: model.moderation_role = role.id await model.save() @@ -55,16 +69,25 @@ async def moderation_role_command(ctx: lightbulb.Context) -> None: @config_command.child -@lightbulb.option("role", "The role to set as mod role", type=hikari.Role) +@lightbulb.option( + "role", "The role to set as mod role", type=hikari.Role, required=False +) @lightbulb.command( "mod", "Setup Mod role for the server[Example: /role mod @Moderator]" ) @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) async def mod_role_command(ctx: lightbulb.Context) -> None: - role: hikari.Role = ctx.options.role + role: hikari.Role | None = ctx.options.role model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) if model is None: await ModerationRoles.create(guild_id=ctx.guild_id, mod_role=role.id) + elif role is None: + model.mod_role = None + await model.save() + await delete_moderation_roles(model) + return await ctx.respond( + "Cleared Mod role for the guild", flags=hikari.MessageFlag.EPHEMERAL + ) else: model.mod_role = role.id await model.save() @@ -80,16 +103,25 @@ async def mod_role_command(ctx: lightbulb.Context) -> None: @config_command.child -@lightbulb.option("role", "The role to set as admin role", type=hikari.Role) +@lightbulb.option( + "role", "The role to set as admin role", type=hikari.Role, required=False +) @lightbulb.command( "admin", "Setup Admin role for the server[Example: /role admin @Admin]" ) @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) async def admin_role_command(ctx: lightbulb.Context) -> None: - role: hikari.Role = ctx.options.role + role: hikari.Role | None = ctx.options.role model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) if model is None: await ModerationRoles.create(guild_id=ctx.guild_id, admin_role=role.id) + elif role is None: + model.admin_role = None + await model.save() + await delete_moderation_roles(model) + return await ctx.respond( + "Cleared Admin role for the guild", flags=hikari.MessageFlag.EPHEMERAL + ) else: model.admin_role = role.id await model.save() @@ -135,26 +167,6 @@ async def list_command(ctx: lightbulb.Context) -> None: await ctx.respond(embed=embed) -@config_command.child -@lightbulb.command("clear", "Clear all the moderation roles") -@lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) -async def clear_command(ctx: lightbulb.Context) -> None: - model = await ModerationRoles.get_or_none(guild_id=ctx.guild_id) - if model is None: - await ctx.bot.help_command.send_group_help(ctx, ctx.command) - raise PermissionsError("No Moderation roles have been setup for the server!") - - await model.delete() - await ctx.respond( - embed=hikari.Embed( - title=f"Config [Moderation Roles] - {ctx.get_guild().name}", - description="All moderation roles have been cleared", - color=EmbedColors.SUCCESS, - timestamp=datetime.now().astimezone(), - ) - ) - - @config_command.child @lightbulb.option( "channel", From b9602356a9b74f725f3803fc7163f5e7d8e4db93 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 20:52:07 +0545 Subject: [PATCH 22/44] feat: add `kick` command --- peacebot/core/plugins/Moderation/mod.py | 66 +++++++++++++++++++------ 1 file changed, 50 insertions(+), 16 deletions(-) mode change 100644 => 100755 peacebot/core/plugins/Moderation/mod.py diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py old mode 100644 new mode 100755 index 1bc84f1..ef67726 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -8,7 +8,12 @@ from peacebot.core.utils.embed_colors import EmbedColors from peacebot.core.utils.errors import ModerationError from peacebot.core.utils.helper_functions import convert_time -from peacebot.core.utils.permissions import mod_logs_check, moderation_role_check +from peacebot.core.utils.permissions import ( + mod_logs_check, + mod_role_check, + moderation_role_check, + register_cases, +) from peacebot.core.utils.utilities import _chunk mod_plugin = lightbulb.Plugin("Mod", "Commands to be used by the Moderators") @@ -41,7 +46,7 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: embed = ( hikari.Embed( description=f"🔇Timed Out -> {member}\n**Reason:** {ctx.options.reason}", - color=EmbedColors.ERROR, + color=EmbedColors.INFO, timestamp=datetime.now().astimezone(), ) .set_author( @@ -53,14 +58,12 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: await mod_logs.send(embed=embed) response = await ctx.respond(embed=embed) message_link = (await response.message()).make_link(ctx.guild_id) - await ModLogs.create( - guild_id=ctx.guild_id, - moderator=f"<@{ctx.author.id}>", - target=f"<@{member.id}>", + await register_cases( + context=ctx, reason=ctx.options.reason, - message=message_link, - channel=f"<#{ctx.channel_id}>", type="TimeOut Enable", + target=member.id, + message_link=message_link, ) @@ -70,7 +73,7 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: @lightbulb.command("disable", "Remove timeout from a member") @lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) async def disable_timeout_command(ctx: lightbulb.Context) -> None: - member: hikari.Member = ctx.options.member + member: hikari.InteractionMember = ctx.options.member mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) await member.edit(communication_disabled_until=now, reason=ctx.options.reason) @@ -88,14 +91,45 @@ async def disable_timeout_command(ctx: lightbulb.Context) -> None: await mod_logs.send(embed=embed) response = await ctx.respond(embed=embed) message_link = (await response.message()).make_link(ctx.guild_id) - await ModLogs.create( - guild_id=ctx.guild_id, - moderator=f"<@{ctx.author.id}>", - target=f"<@{member.id}>", + await register_cases( + context=ctx, + reason=ctx.options.reason, + type="TimeOut Disable", + target=member.id, + message_link=message_link, + ) + + +@mod_plugin.command +@lightbulb.option("reason", "The reason to kick the member") +@lightbulb.option("member", "The member to kick", type=hikari.Member) +@lightbulb.command("kick", "Kick the member from the server") +@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@mod_role_check +async def kick_command(ctx: lightbulb.Context) -> None: + member: hikari.InteractionMember = ctx.options.member + mod_logs = await mod_logs_check(ctx) + await member.kick(reason=ctx.options.reason) + embed = ( + hikari.Embed( + description=f"👢 Kicked -> {member}\n**Reason:** {ctx.options.reason}", + color=EmbedColors.INFO, + timestamp=datetime.now().astimezone(), + ) + .set_author( + name=f"{ctx.author}(ID {ctx.author.id})", icon=ctx.author.avatar_url + ) + .set_thumbnail(member.avatar_url) + ) + await mod_logs.send(embed=embed) + response = await ctx.respond(embed=embed) + message_link = (await response.message()).make_link(ctx.guild_id) + await register_cases( + context=ctx, reason=ctx.options.reason, - message=message_link, - channel=f"<#{ctx.channel_id}>", - type="Timeout Disable", + type="Kick", + target=member.id, + message_link=message_link, ) From cc077245b8004741231955a8e38d8e87a3f696a1 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 20:53:10 +0545 Subject: [PATCH 23/44] feat: add a method for registering moderation cases --- peacebot/core/utils/permissions.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) mode change 100644 => 100755 peacebot/core/utils/permissions.py diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py old mode 100644 new mode 100755 index 823469a..a7c4e1f --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -130,3 +130,21 @@ async def delete_moderation_roles(model: ModerationRoles) -> None: ): return await model.delete() pass + + +async def register_cases( + context: lightbulb.Context, + reason: str, + type: str, + target: int, + message_link: str, +) -> None: + await ModLogs.create( + guild_id=context.guild_id, + moderator=f"<@{context.author.id}>", + target=f"<@{target}>", + reason=reason, + message=message_link, + channel=f"<#{context.channel_id}>", + type=type, + ) From fd7eefc456578dd540a5200ff2b561d177380090 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 21:26:01 +0545 Subject: [PATCH 24/44] refactor: change parameters of the `register_cases` function and add docstrings to explain the parameters --- peacebot/core/utils/permissions.py | 35 +++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py index a7c4e1f..210fb25 100755 --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -1,5 +1,6 @@ import hikari import lightbulb +from isort import stream from models import GuildModel, ModerationRoles, ModLogs @@ -133,18 +134,40 @@ async def delete_moderation_roles(model: ModerationRoles) -> None: async def register_cases( - context: lightbulb.Context, - reason: str, - type: str, + guild_id: int, + moderator: int, target: int, + reason: str, message_link: str, + channel_id: int, + type: str, ) -> None: + """ + This function helps in registering Moderation cases to the database + + Parameters + ---------- + guild_id : int + ID of the Guild where this moderation was performed + moderator : int + ID of the moderator who performed the action + target : int + ID of the target of the moderation action + reason : str + Reason due to which moderation action was taken + message_link : str + Link of the moderation message + channel_id : int + ID of the Channel where the action was performed + type : str + Type of Moderation Action, E.G => [Kick, Timeout Enable, Ban] etc. + """ await ModLogs.create( - guild_id=context.guild_id, - moderator=f"<@{context.author.id}>", + guild_id=guild_id, + moderator=f"<@{moderator}>", target=f"<@{target}>", reason=reason, message=message_link, - channel=f"<#{context.channel_id}>", + channel=f"<#{channel_id}>", type=type, ) From 79402305823cafdc1cd44f1f74004dd51f2466c5 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 21:26:38 +0545 Subject: [PATCH 25/44] refactor: update `register_cases` function call according to the definition of the function --- peacebot/core/plugins/Moderation/mod.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index ef67726..e589861 100755 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -59,11 +59,13 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: response = await ctx.respond(embed=embed) message_link = (await response.message()).make_link(ctx.guild_id) await register_cases( - context=ctx, - reason=ctx.options.reason, - type="TimeOut Enable", + guild_id=ctx.guild_id, + moderator=ctx.author.id, target=member.id, + reason=ctx.options.reason, message_link=message_link, + channel_id=ctx.channel_id, + type="TimeOut Enable", ) @@ -92,11 +94,13 @@ async def disable_timeout_command(ctx: lightbulb.Context) -> None: response = await ctx.respond(embed=embed) message_link = (await response.message()).make_link(ctx.guild_id) await register_cases( - context=ctx, - reason=ctx.options.reason, - type="TimeOut Disable", + guild_id=ctx.guild_id, + moderator=ctx.author.id, target=member.id, + reason=ctx.options.reason, message_link=message_link, + channel_id=ctx.channel_id, + type="TimeOut Disable", ) @@ -125,11 +129,13 @@ async def kick_command(ctx: lightbulb.Context) -> None: response = await ctx.respond(embed=embed) message_link = (await response.message()).make_link(ctx.guild_id) await register_cases( - context=ctx, - reason=ctx.options.reason, - type="Kick", + guild_id=ctx.guild_id, + moderator=ctx.author.id, target=member.id, + reason=ctx.options.reason, message_link=message_link, + channel_id=ctx.channel_id, + type="Kick", ) From 9cb2b14c017ef717a94cd2b10c4c9e82fb085685 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 21:33:31 +0545 Subject: [PATCH 26/44] refactor: add docstrings and make `higher_role_check` function synchronous and remove unnecessary import This commit adds docstrings to some of the functions and removes asynchronous function definition from the `higher_role_check` function as it was redundant to do so and also it removes some of the unnecessary imports in the file --- peacebot/core/utils/permissions.py | 36 ++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py index 210fb25..44fe46c 100755 --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -1,6 +1,5 @@ import hikari import lightbulb -from isort import stream from models import GuildModel, ModerationRoles, ModLogs @@ -102,7 +101,22 @@ async def predicate(ctx: lightbulb.Context, *args, **kwargs): return predicate -async def higher_role_check(author: hikari.Member, member: hikari.Member) -> None: +def higher_role_check(author: hikari.Member, member: hikari.Member) -> None: + """ + This function helps in checking the role heirarchy position of author and the member of the command invokation + + Parameters + ---------- + author : hikari.Member + Author of command invokation + member : hikari.Member + Member of the command invokation + + Raises + ------ + PermissionsError + Raised when author role position is not higher than member role + """ author_top_role = author.get_top_role() member_top_role = member.get_top_role() @@ -113,6 +127,24 @@ async def higher_role_check(author: hikari.Member, member: hikari.Member) -> Non async def mod_logs_check(ctx: lightbulb.Context) -> hikari.GuildChannel: + """ + This function helps in checking for Moderation Logging channel in a guild + + Parameters + ---------- + ctx : lightbulb.Context + Context of the Command Invokation + + Returns + ------- + hikari.GuildChannel + GuildChannel object of the Moderation Logging Channel + + Raises + ------ + PermissionsError + Raised when no Moderation Logging channel is set for the server + """ model = await GuildModel.get_or_none(id=ctx.guild_id) if model is None or model.mod_log_channel is None: raise PermissionsError( From 6d5a3adfe23321c4c08fd66dd1dc8b8c32ee15c8 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 21:39:21 +0545 Subject: [PATCH 27/44] refactor: add more docstrings to all the functions This commit removes asynchronous function definition from `role_check` and `has_permissions` function as they are unnecessary and no async/await was found in the function making it redundant. --- peacebot/core/utils/permissions.py | 64 ++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py index 44fe46c..83b9f39 100755 --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -8,9 +8,24 @@ class PermissionsError(lightbulb.LightbulbError): pass -async def has_permissions( +def has_permissions( member: hikari.Member, permission: list[hikari.Permissions] ) -> bool: + """ + Function that checks for specific permissions in a User + + Parameters + ---------- + member : hikari.Member + Member on whom the check is to be performed + permission : list[hikari.Permissions] + List of Permissions to be checked against the User + + Returns + ------- + bool + Boolean value based on whether the member has the required permissions or not + """ roles = member.get_roles() perms = hikari.Permissions.NONE for role in roles: @@ -22,13 +37,46 @@ async def has_permissions( return False -async def role_check(member: hikari.Member, role: hikari.Role) -> bool: +def role_check(member: hikari.Member, role: hikari.Role) -> bool: + """ + Function that checks if a member has a certain role + + Parameters + ---------- + member : hikari.Member + Member on which check is to be performed + role : hikari.Role + Role which is to be checked on the user + + Returns + ------- + bool + [description] + """ if role.id in member.role_ids: return True return False async def get_role_data(guild: hikari.Guild) -> dict: + """ + This function retrieves the moderation roles set from the database and returns them in Python Dictionary + + Parameters + ---------- + guild : hikari.Guild + Guild whose roles are to be fetched + + Returns + ------- + dict + Key Value pairs of the moderation roles + + Raises + ------ + PermissionsError + Raised when no moderation roles are set for the server + """ model = await ModerationRoles.get_or_none(guild_id=guild.id) if ( model is None @@ -57,8 +105,8 @@ async def predicate(ctx: lightbulb.Context, *args, **kwargs): "moderation_role" ) if not ( - await has_permissions(ctx.member, ["MANAGE_MESSAGES", "ADMINISTRATOR"]) - or await role_check(ctx.member, moderation_role) + has_permissions(ctx.member, ["MANAGE_MESSAGES", "ADMINISTRATOR"]) + or role_check(ctx.member, moderation_role) ): raise PermissionsError( f"You need to have the permissions required to run this command!\nRole Required: {moderation_role.mention}" @@ -72,8 +120,8 @@ def mod_role_check(f): async def predicate(ctx: lightbulb.Context, *args, **kwargs): mod_role: hikari.Role = (await get_role_data(ctx.get_guild())).get("mod_role") if not ( - await has_permissions(ctx.member, ["MANAGE_ROLES", "ADMINISTRATOR"]) - or await role_check(ctx.member, mod_role) + has_permissions(ctx.member, ["MANAGE_ROLES", "ADMINISTRATOR"]) + or role_check(ctx.member, mod_role) ): raise PermissionsError( f"You need to have the permissions required to run this command!\nRole Required: {mod_role.mention}" @@ -90,8 +138,8 @@ async def predicate(ctx: lightbulb.Context, *args, **kwargs): "admin_role" ) if not ( - await has_permissions(ctx.member, ["ADMINISTRATOR"]) - or await role_check(ctx.member, admin_role) + has_permissions(ctx.member, ["ADMINISTRATOR"]) + or role_check(ctx.member, admin_role) ): raise PermissionsError( f"You need to have the permissions required to run this command!\nRole Required: {admin_role.mention}" From 3bbcea0e24974107b9ff46e347c4e5160485bdd2 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:05:17 +0545 Subject: [PATCH 28/44] refactor: move `on_error` from `peacebot.core.utils.errors` to `peacebot.core.plugins.Admin.admin` --- peacebot/core/bot.py | 3 -- peacebot/core/plugins/Admin/admin.py | 77 ++++++++++++++++++++++++++++ peacebot/core/utils/errors.py | 72 -------------------------- 3 files changed, 77 insertions(+), 75 deletions(-) mode change 100644 => 100755 peacebot/core/bot.py mode change 100644 => 100755 peacebot/core/plugins/Admin/admin.py mode change 100644 => 100755 peacebot/core/utils/errors.py diff --git a/peacebot/core/bot.py b/peacebot/core/bot.py old mode 100644 new mode 100755 index e35f626..1a48115 --- a/peacebot/core/bot.py +++ b/peacebot/core/bot.py @@ -2,7 +2,6 @@ import asyncio import logging -from pathlib import Path import aioredis import hikari @@ -20,7 +19,6 @@ from peacebot.core.event_handler import EventHandler from peacebot.core.utils.activity import CustomActivity from peacebot.core.utils.embed_colors import EmbedColors -from peacebot.core.utils.errors import on_error from tortoise_config import tortoise_config logger = logging.getLogger("peacebot.main") @@ -74,7 +72,6 @@ def run(self) -> None: self.event_manager.subscribe(hikari.StartedEvent, self.on_started) self.event_manager.subscribe(hikari.StoppingEvent, self.on_stopping) self.event_manager.subscribe(hikari.StoppedEvent, self.on_stopped) - self.event_manager.subscribe(lightbulb.CommandErrorEvent, on_error) self.event_manager.subscribe(hikari.ShardReadyEvent, self.on_shard_ready) self.event_manager.subscribe(hikari.GuildMessageCreateEvent, self.on_message) diff --git a/peacebot/core/plugins/Admin/admin.py b/peacebot/core/plugins/Admin/admin.py old mode 100644 new mode 100755 index 7b61fd9..10d244b --- a/peacebot/core/plugins/Admin/admin.py +++ b/peacebot/core/plugins/Admin/admin.py @@ -1,7 +1,11 @@ +import math +import re + import hikari import lightbulb from models import GuildModel +from peacebot.core.utils.embed_colors import EmbedColors admin_plugin = lightbulb.Plugin( name="Admin", description="Admin commands for the server" @@ -24,6 +28,79 @@ async def changeprefix(ctx: lightbulb.Context) -> None: await ctx.respond(f"I set your guild's prefix to `{prefix}`") +@admin_plugin.listener(lightbulb.CommandErrorEvent) +async def on_error(event: lightbulb.CommandErrorEvent) -> None: + + error = event.exception + if isinstance(error, lightbulb.CommandNotFound): + return + + if isinstance(error, lightbulb.BotMissingRequiredPermission): + missing = [ + perm.replace("_", " ").replace("guild", "server").title() + for perm in str(error.missing_perms).split("|") + ] + if len(missing) > 2: + fmt = "{}, and {}".format("**, **".join(missing[:-1]), missing[-1]) + else: + fmt = " and ".join(missing) + + _message = f"I need the **{fmt}** permission(s) to run this command." + + embed = hikari.Embed( + title="I am Missing Permissions", + color=EmbedColors.ALERT, + description=_message, + ) + return await event.context.respond( + embed=embed, flags=hikari.MessageFlag.EPHEMERAL + ) + + if isinstance(error, lightbulb.CommandIsOnCooldown): + embed = hikari.Embed( + title="Command on Cooldown", + color=EmbedColors.ALERT, + description=f"This command is on cooldown, please retry in {math.ceil(error.retry_after)}s.", + ) + return await event.context.respond( + embed=embed, flags=hikari.MessageFlag.EPHEMERAL + ) + + if isinstance(error, lightbulb.NotEnoughArguments): + return await event.bot.help_command.send_command_help( + event.context, event.context.command + ) + + if isinstance(error, lightbulb.MissingRequiredPermission): + missing = [ + perm.replace("_", " ").replace("guild", "server").title() + for perm in str(error.missing_perms).split("|") + ] + if len(missing) > 2: + fmt = "{}, and {}".format("**, **".join(missing[:-1]), missing[-1]) + else: + fmt = " and ".join(missing) + _message = "You need the **{}** permission(s) to use this command.".format(fmt) + + embed = hikari.Embed( + title="You are missing permissions", + color=EmbedColors.ALERT, + description=_message, + ) + return await event.context.respond( + embed=embed, flags=hikari.MessageFlag.EPHEMERAL + ) + + title = " ".join(re.compile(r"[A-Z][a-z]*").findall(error.__class__.__name__)) + await event.context.respond( + embed=hikari.Embed( + title=title, description=str(error), color=EmbedColors.ALERT + ), + flags=hikari.MessageFlag.EPHEMERAL, + ) + raise error + + def load(bot: lightbulb.BotApp) -> None: bot.add_plugin(admin_plugin) diff --git a/peacebot/core/utils/errors.py b/peacebot/core/utils/errors.py old mode 100644 new mode 100755 index ab098c2..4c38dde --- a/peacebot/core/utils/errors.py +++ b/peacebot/core/utils/errors.py @@ -16,75 +16,3 @@ class HelpersError(lightbulb.LightbulbError): class ModerationError(lightbulb.LightbulbError): pass - - -async def on_error(event: lightbulb.CommandErrorEvent) -> None: - - error = event.exception - if isinstance(error, lightbulb.CommandNotFound): - return - - if isinstance(error, lightbulb.BotMissingRequiredPermission): - missing = [ - perm.replace("_", " ").replace("guild", "server").title() - for perm in str(error.missing_perms).split("|") - ] - if len(missing) > 2: - fmt = "{}, and {}".format("**, **".join(missing[:-1]), missing[-1]) - else: - fmt = " and ".join(missing) - - _message = f"I need the **{fmt}** permission(s) to run this command." - - embed = hikari.Embed( - title="I am Missing Permissions", - color=EmbedColors.ALERT, - description=_message, - ) - return await event.context.respond( - embed=embed, flags=hikari.MessageFlag.EPHEMERAL - ) - - if isinstance(error, lightbulb.CommandIsOnCooldown): - embed = hikari.Embed( - title="Command on Cooldown", - color=EmbedColors.ALERT, - description=f"This command is on cooldown, please retry in {math.ceil(error.retry_after)}s.", - ) - return await event.context.respond( - embed=embed, flags=hikari.MessageFlag.EPHEMERAL - ) - - if isinstance(error, lightbulb.NotEnoughArguments): - return await event.bot.help_command.send_command_help( - event.context, event.context.command - ) - - if isinstance(error, lightbulb.MissingRequiredPermission): - missing = [ - perm.replace("_", " ").replace("guild", "server").title() - for perm in str(error.missing_perms).split("|") - ] - if len(missing) > 2: - fmt = "{}, and {}".format("**, **".join(missing[:-1]), missing[-1]) - else: - fmt = " and ".join(missing) - _message = "You need the **{}** permission(s) to use this command.".format(fmt) - - embed = hikari.Embed( - title="You are missing permissions", - color=EmbedColors.ALERT, - description=_message, - ) - return await event.context.respond( - embed=embed, flags=hikari.MessageFlag.EPHEMERAL - ) - - title = " ".join(re.compile(r"[A-Z][a-z]*").findall(error.__class__.__name__)) - await event.context.respond( - embed=hikari.Embed( - title=title, description=str(error), color=EmbedColors.ALERT - ), - flags=hikari.MessageFlag.EPHEMERAL, - ) - raise error From 41ae93e1f5aec67fb7a7af6ab0f5972844e32d19 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:07:09 +0545 Subject: [PATCH 29/44] refactor: remove unnecessary imports and unnecessary logger --- peacebot/core/utils/errors.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/peacebot/core/utils/errors.py b/peacebot/core/utils/errors.py index 4c38dde..f62db3e 100755 --- a/peacebot/core/utils/errors.py +++ b/peacebot/core/utils/errors.py @@ -1,14 +1,5 @@ -import logging -import math -import re - -import hikari import lightbulb -from peacebot.core.utils.embed_colors import EmbedColors - -logger = logging.getLogger("error_handler") - class HelpersError(lightbulb.LightbulbError): pass From 253910ce1d9ea26e4387c9cf72ee31e09daadf42 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:10:39 +0545 Subject: [PATCH 30/44] refactor: add `higher_role_check` and move `ModerationError` to `peacebot.core.utils.errors` --- peacebot/core/plugins/Moderation/mod.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index e589861..b60cdc1 100755 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -9,6 +9,7 @@ from peacebot.core.utils.errors import ModerationError from peacebot.core.utils.helper_functions import convert_time from peacebot.core.utils.permissions import ( + higher_role_check, mod_logs_check, mod_role_check, moderation_role_check, @@ -36,6 +37,7 @@ async def timeout(ctx: lightbulb.Context) -> None: @moderation_role_check async def timeout_enable_command(ctx: lightbulb.Context) -> None: member: hikari.Member = ctx.options.member + higher_role_check(ctx.author, member) mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) time_seconds = convert_time(ctx.options.time) @@ -76,6 +78,7 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: @lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) async def disable_timeout_command(ctx: lightbulb.Context) -> None: member: hikari.InteractionMember = ctx.options.member + higher_role_check(ctx.author, member) mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) await member.edit(communication_disabled_until=now, reason=ctx.options.reason) @@ -112,6 +115,7 @@ async def disable_timeout_command(ctx: lightbulb.Context) -> None: @mod_role_check async def kick_command(ctx: lightbulb.Context) -> None: member: hikari.InteractionMember = ctx.options.member + higher_role_check(ctx.author, member) mod_logs = await mod_logs_check(ctx) await member.kick(reason=ctx.options.reason) embed = ( From f14e088f948a04bf9f4207946d7fe326ae8ea33b Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:11:19 +0545 Subject: [PATCH 31/44] refactor: move `PermissionsError` to `peacebot.core.utils.errors` --- peacebot/core/utils/permissions.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/peacebot/core/utils/permissions.py b/peacebot/core/utils/permissions.py index 83b9f39..630b21f 100755 --- a/peacebot/core/utils/permissions.py +++ b/peacebot/core/utils/permissions.py @@ -2,10 +2,7 @@ import lightbulb from models import GuildModel, ModerationRoles, ModLogs - - -class PermissionsError(lightbulb.LightbulbError): - pass +from peacebot.core.utils.errors import PermissionsError def has_permissions( From 3e1afc639faeafcf0b2549c18f780b9362b8ee07 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:12:39 +0545 Subject: [PATCH 32/44] refactor: move `CommandError` to `peacebot.core.utils.errors` --- peacebot/core/plugins/Admin/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) mode change 100644 => 100755 peacebot/core/plugins/Admin/__init__.py diff --git a/peacebot/core/plugins/Admin/__init__.py b/peacebot/core/plugins/Admin/__init__.py old mode 100644 new mode 100755 index cd45bc2..a443e28 --- a/peacebot/core/plugins/Admin/__init__.py +++ b/peacebot/core/plugins/Admin/__init__.py @@ -4,10 +4,7 @@ import lightbulb from peacebot.core.utils.embed_colors import EmbedColors - - -class CommandError(lightbulb.LightbulbError): - pass +from peacebot.core.utils.errors import CommandError async def handle_plugins(ctx: lightbulb.Context, plugin_str: str, action: str) -> None: From 51326085cfb813973898b7db15a0f2d5a48b1b21 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:13:13 +0545 Subject: [PATCH 33/44] refactor: move `MusicError` to `peacebot.core.utils.errors` --- peacebot/core/plugins/Music/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) mode change 100644 => 100755 peacebot/core/plugins/Music/__init__.py diff --git a/peacebot/core/plugins/Music/__init__.py b/peacebot/core/plugins/Music/__init__.py old mode 100644 new mode 100755 index 62666ca..73c48b7 --- a/peacebot/core/plugins/Music/__init__.py +++ b/peacebot/core/plugins/Music/__init__.py @@ -3,6 +3,8 @@ import lavasnek_rs import lightbulb +from peacebot.core.utils.errors import MusicError + __all__ = ["_join", "_leave", "check_voice_state", "fetch_lavalink"] # URL_REGEX = re.compile( @@ -10,10 +12,6 @@ # ) -class MusicError(lightbulb.LightbulbError): - pass - - async def _join(ctx: lightbulb.Context) -> int: lavalink = fetch_lavalink(ctx.bot) if ctx.bot.cache.get_voice_state(ctx.get_guild(), ctx.bot.get_me()): From 7e80ff414bfef004d087193c3faeb63ebec14b4d Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:13:43 +0545 Subject: [PATCH 34/44] refactor: move all the errors from all the other files to this file --- peacebot/core/utils/errors.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/peacebot/core/utils/errors.py b/peacebot/core/utils/errors.py index f62db3e..a2bf3fb 100755 --- a/peacebot/core/utils/errors.py +++ b/peacebot/core/utils/errors.py @@ -7,3 +7,15 @@ class HelpersError(lightbulb.LightbulbError): class ModerationError(lightbulb.LightbulbError): pass + + +class CommandError(lightbulb.LightbulbError): + pass + + +class MusicError(lightbulb.LightbulbError): + pass + + +class PermissionsError(lightbulb.LightbulbError): + pass From b9833196963fca353d70b961dba7c94393710787 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:23:54 +0545 Subject: [PATCH 35/44] feat: add ModLogs model --- .dockerignore | 0 .env.example | 0 .github/dependabot.yml | 0 .github/workflows/black.yml | 0 .github/workflows/codeql.yml | 0 .gitignore | 6 ++- .vscode/settings.json | 6 ++- Dockerfile | 0 LICENSE | 0 Makefile | 0 README.md | 0 docker-compose.yml | 0 models.py | 23 +++++++++ peacebot/__init__.py | 2 - peacebot/__main__.py | 0 peacebot/assets/__init__.py | 0 peacebot/assets/banner.txt | 0 peacebot/config/__init__.py | 2 + peacebot/config/bot.py | 1 + peacebot/config/database.py | 0 peacebot/config/lavalink.py | 0 peacebot/config/reddit.py | 0 peacebot/core/event_handler.py | 0 peacebot/core/plugins/Admin/owner.py | 10 ++-- .../core/plugins/AutoResponse/__init__.py | 0 .../core/plugins/AutoResponse/autoresponse.py | 6 +-- peacebot/core/plugins/Fun/__init__.py | 0 peacebot/core/plugins/Fun/animals.py | 0 peacebot/core/plugins/Fun/nsfw.py | 0 .../core/plugins/Miscellaneous/__init__.py | 10 +--- peacebot/core/plugins/Miscellaneous/misc.py | 48 +++++++++++------- peacebot/core/plugins/Miscellaneous/rtfm.py | 0 peacebot/core/plugins/Music/music.py | 2 +- peacebot/core/utils/activity.py | 0 peacebot/core/utils/buttons.py | 0 peacebot/core/utils/embed_colors.py | 0 peacebot/core/utils/helper_functions.py | 0 peacebot/core/utils/rtfm_helper.py | 0 peacebot/core/utils/utilities.py | 0 tortoise_config.py | 0 ...ha.3-cp310-cp310-manylinux_2_24_x86_64.whl | Bin 41 files changed, 74 insertions(+), 42 deletions(-) mode change 100644 => 100755 .dockerignore mode change 100644 => 100755 .env.example mode change 100644 => 100755 .github/dependabot.yml mode change 100644 => 100755 .github/workflows/black.yml mode change 100644 => 100755 .github/workflows/codeql.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .vscode/settings.json mode change 100644 => 100755 Dockerfile mode change 100644 => 100755 LICENSE mode change 100644 => 100755 Makefile mode change 100644 => 100755 README.md mode change 100644 => 100755 docker-compose.yml mode change 100644 => 100755 models.py mode change 100644 => 100755 peacebot/__init__.py mode change 100644 => 100755 peacebot/__main__.py mode change 100644 => 100755 peacebot/assets/__init__.py mode change 100644 => 100755 peacebot/assets/banner.txt mode change 100644 => 100755 peacebot/config/__init__.py mode change 100644 => 100755 peacebot/config/bot.py mode change 100644 => 100755 peacebot/config/database.py mode change 100644 => 100755 peacebot/config/lavalink.py mode change 100644 => 100755 peacebot/config/reddit.py mode change 100644 => 100755 peacebot/core/event_handler.py mode change 100644 => 100755 peacebot/core/plugins/Admin/owner.py mode change 100644 => 100755 peacebot/core/plugins/AutoResponse/__init__.py mode change 100644 => 100755 peacebot/core/plugins/AutoResponse/autoresponse.py mode change 100644 => 100755 peacebot/core/plugins/Fun/__init__.py mode change 100644 => 100755 peacebot/core/plugins/Fun/animals.py mode change 100644 => 100755 peacebot/core/plugins/Fun/nsfw.py mode change 100644 => 100755 peacebot/core/plugins/Miscellaneous/__init__.py mode change 100644 => 100755 peacebot/core/plugins/Miscellaneous/misc.py mode change 100644 => 100755 peacebot/core/plugins/Miscellaneous/rtfm.py mode change 100644 => 100755 peacebot/core/plugins/Music/music.py mode change 100644 => 100755 peacebot/core/utils/activity.py mode change 100644 => 100755 peacebot/core/utils/buttons.py mode change 100644 => 100755 peacebot/core/utils/embed_colors.py mode change 100644 => 100755 peacebot/core/utils/helper_functions.py mode change 100644 => 100755 peacebot/core/utils/rtfm_helper.py mode change 100644 => 100755 peacebot/core/utils/utilities.py mode change 100644 => 100755 tortoise_config.py mode change 100644 => 100755 wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl diff --git a/.dockerignore b/.dockerignore old mode 100644 new mode 100755 diff --git a/.env.example b/.env.example old mode 100644 new mode 100755 diff --git a/.github/dependabot.yml b/.github/dependabot.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 87833b9..960e423 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # Python Stuffs __pycache__/ - # Config Stuffs .env @@ -10,4 +9,7 @@ aerich.ini migrations/ # Cache -*.pickle \ No newline at end of file +*.pickle + +# Random Stuff +test.py diff --git a/.vscode/settings.json b/.vscode/settings.json old mode 100644 new mode 100755 index 23b2407..4690951 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,5 +10,7 @@ "source.organizeImports": true } }, - "python.linting.pylintEnabled": false -} + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": false, + "python.linting.enabled": false +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/docker-compose.yml b/docker-compose.yml old mode 100644 new mode 100755 diff --git a/models.py b/models.py old mode 100644 new mode 100755 index 1d413d7..94042ad --- a/models.py +++ b/models.py @@ -1,3 +1,5 @@ +from pydoc import describe + from tortoise import fields from tortoise.models import Model @@ -22,6 +24,9 @@ class GuildModel(CustomModel): max_length=10, description="Custom Prefix for the guild", ) + mod_log_channel = fields.BigIntField( + description="Mod Log channel for the guild!", null=True + ) class Meta: """Class to set the table name and description""" @@ -77,3 +82,21 @@ class ModerationRoles(CustomModel): class Meta: table = "staff_roles" table_description = "Stores the roles for the moderation" + + +class ModLogs(CustomModel): + id = fields.IntField(description="ID of the Case", pk=True) + guild_id = fields.BigIntField(description="ID of the Guild") + moderator = fields.TextField(description="Moderator that performed the action") + target = fields.TextField(description="Victim of the moderation action") + reason = fields.TextField(description="Reason of Moderation Action") + type = fields.TextField(description="Type of Moderation action") + timestamp = fields.DatetimeField( + description="Timestamp of the action", auto_now=True + ) + message = fields.TextField(description="Message Link of the action") + channel = fields.TextField(description="Channel of action") + + class Meta: + table = "mod_logs" + table_description = "Stores all the moderation actions" diff --git a/peacebot/__init__.py b/peacebot/__init__.py old mode 100644 new mode 100755 index e5e988e..e72a584 --- a/peacebot/__init__.py +++ b/peacebot/__init__.py @@ -1,3 +1 @@ from .config import bot_config, db_config, lavalink_config - -__all__ = ["bot_config", "db_config"] diff --git a/peacebot/__main__.py b/peacebot/__main__.py old mode 100644 new mode 100755 diff --git a/peacebot/assets/__init__.py b/peacebot/assets/__init__.py old mode 100644 new mode 100755 diff --git a/peacebot/assets/banner.txt b/peacebot/assets/banner.txt old mode 100644 new mode 100755 diff --git a/peacebot/config/__init__.py b/peacebot/config/__init__.py old mode 100644 new mode 100755 index f5af188..99f9daf --- a/peacebot/config/__init__.py +++ b/peacebot/config/__init__.py @@ -1,3 +1,5 @@ from .bot import bot_config from .database import db_config from .lavalink import lavalink_config + +__all__ = ["bot_config", "db_config", "lavalink_config"] diff --git a/peacebot/config/bot.py b/peacebot/config/bot.py old mode 100644 new mode 100755 index ffa8d80..1757e39 --- a/peacebot/config/bot.py +++ b/peacebot/config/bot.py @@ -5,6 +5,7 @@ class BotConfig(BaseSettings): token: str prefix: str test_guilds: list[int] + log_webhook: int class Config: env_file = ".env" diff --git a/peacebot/config/database.py b/peacebot/config/database.py old mode 100644 new mode 100755 diff --git a/peacebot/config/lavalink.py b/peacebot/config/lavalink.py old mode 100644 new mode 100755 diff --git a/peacebot/config/reddit.py b/peacebot/config/reddit.py old mode 100644 new mode 100755 diff --git a/peacebot/core/event_handler.py b/peacebot/core/event_handler.py old mode 100644 new mode 100755 diff --git a/peacebot/core/plugins/Admin/owner.py b/peacebot/core/plugins/Admin/owner.py old mode 100644 new mode 100755 index ff62a3a..299db90 --- a/peacebot/core/plugins/Admin/owner.py +++ b/peacebot/core/plugins/Admin/owner.py @@ -13,7 +13,7 @@ import yuyo from lightbulb.utils import nav -import peacebot.core.utils.helper_functions as hf +from peacebot.core.utils.helper_functions import error_handler from . import CommandError, handle_plugins @@ -76,7 +76,7 @@ async def eval_python_code_no_capture(ctx: lightbulb.Context, code: str) -> None @lightbulb.set_help(docstring=True) @lightbulb.command("eval", "Run Evals as Bot owner") @lightbulb.implements(lightbulb.PrefixCommand) -@hf.error_handler() +@error_handler() async def eval_command(ctx: lightbulb.Context) -> None: """ Dynamically evaluate a script in the bot's environment. @@ -113,7 +113,7 @@ async def eval_command(ctx: lightbulb.Context) -> None: @lightbulb.option("plugin", "Name of the plugin") @lightbulb.command("reload", "Reload a specific plugin.") @lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) -@hf.error_handler() +@error_handler() async def reload_plugin(ctx: lightbulb.Context) -> None: plugin = ctx.options.plugin await handle_plugins(ctx, plugin, "reload") @@ -123,7 +123,7 @@ async def reload_plugin(ctx: lightbulb.Context) -> None: @lightbulb.option("plugin", "Name of the plugin") @lightbulb.command("unload", "Unload a specific plugin.") @lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) -@hf.error_handler() +@error_handler() async def unload_plugin(ctx: lightbulb.Context) -> None: plugin = ctx.options.plugin if plugin in [ @@ -139,7 +139,7 @@ async def unload_plugin(ctx: lightbulb.Context) -> None: @lightbulb.option("plugin", "Name of the plugin") @lightbulb.command("load", "Load a specific plugin.") @lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) -@hf.error_handler() +@error_handler() async def load_plugin(ctx: lightbulb.Context) -> None: plugin = ctx.options.plugin await handle_plugins(ctx, plugin, "load") diff --git a/peacebot/core/plugins/AutoResponse/__init__.py b/peacebot/core/plugins/AutoResponse/__init__.py old mode 100644 new mode 100755 diff --git a/peacebot/core/plugins/AutoResponse/autoresponse.py b/peacebot/core/plugins/AutoResponse/autoresponse.py old mode 100644 new mode 100755 index be6c298..2147826 --- a/peacebot/core/plugins/AutoResponse/autoresponse.py +++ b/peacebot/core/plugins/AutoResponse/autoresponse.py @@ -6,9 +6,9 @@ import hikari import lightbulb -import peacebot.core.utils.helper_functions as hf from models import AutoResponseModel, GuildModel from peacebot.core.utils.embed_colors import EmbedColors +from peacebot.core.utils.helper_functions import error_handler from . import AutoResponseError, clone_autoresponse, handle_message, is_valid_uuid @@ -234,7 +234,7 @@ async def autoresponse_export(ctx: lightbulb.Context) -> None: @lightbulb.add_checks(lightbulb.has_guild_permissions(hikari.Permissions.MANAGE_GUILD)) @lightbulb.command("import", "Import autoreponse(s) from another server") @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) -@hf.error_handler() +@error_handler() async def autoresponse_import(ctx: lightbulb.Context) -> None: _id: str = ctx.options.id if _id == str(ctx.guild_id): @@ -291,7 +291,7 @@ async def autoresponse_import(ctx: lightbulb.Context) -> None: @lightbulb.add_checks(lightbulb.has_guild_permissions(hikari.Permissions.MANAGE_GUILD)) @lightbulb.command("toggle", "Enable or disable the autoresponse", aliases=["tgl"]) @lightbulb.implements(lightbulb.PrefixSubCommand, lightbulb.SlashSubCommand) -@hf.error_handler() +@error_handler() async def autoresponse_toggle(ctx: lightbulb.Context) -> None: autoresponse = await AutoResponseModel.get_or_none( guild__id=ctx.guild_id, trigger__iexact=ctx.options.trigger diff --git a/peacebot/core/plugins/Fun/__init__.py b/peacebot/core/plugins/Fun/__init__.py old mode 100644 new mode 100755 diff --git a/peacebot/core/plugins/Fun/animals.py b/peacebot/core/plugins/Fun/animals.py old mode 100644 new mode 100755 diff --git a/peacebot/core/plugins/Fun/nsfw.py b/peacebot/core/plugins/Fun/nsfw.py old mode 100644 new mode 100755 diff --git a/peacebot/core/plugins/Miscellaneous/__init__.py b/peacebot/core/plugins/Miscellaneous/__init__.py old mode 100644 new mode 100755 index e6fc89e..c6cc4c3 --- a/peacebot/core/plugins/Miscellaneous/__init__.py +++ b/peacebot/core/plugins/Miscellaneous/__init__.py @@ -1,17 +1,9 @@ import lightbulb from apscheduler.schedulers.asyncio import AsyncIOScheduler -from peacebot.core.utils.time import TimeConverter - def fetch_scheduler(ctx: lightbulb.Context) -> AsyncIOScheduler: - return ctx.bot.d.scheduler - - -async def convert_time(ctx: lightbulb.Context, time: str) -> float: - seconds = await TimeConverter.convert(TimeConverter, ctx, time) - - return seconds + return ctx.bot.scheduler async def send_remainder(ctx: lightbulb.Context, text: str) -> None: diff --git a/peacebot/core/plugins/Miscellaneous/misc.py b/peacebot/core/plugins/Miscellaneous/misc.py old mode 100644 new mode 100755 index a980937..3af1999 --- a/peacebot/core/plugins/Miscellaneous/misc.py +++ b/peacebot/core/plugins/Miscellaneous/misc.py @@ -1,24 +1,25 @@ +import random from datetime import datetime, timedelta import hikari import lightbulb -import peacebot.core.utils.helper_functions as hf from peacebot.core.utils.embed_colors import EmbedColors +from peacebot.core.utils.helper_functions import convert_time, error_handler -from . import convert_time, fetch_scheduler, send_remainder +from . import fetch_scheduler, send_remainder misc_plugin = lightbulb.Plugin("Misc", "Miscellaneous Commands for the Bot") @misc_plugin.command +@lightbulb.option("target", "The target of this command", type=hikari.Member) @lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) -@lightbulb.option("member", "Get member", type=hikari.Member, required=False) -@lightbulb.command("avatar", "View a member's avatar", aliases=["av"]) -@lightbulb.implements(lightbulb.PrefixCommand, lightbulb.SlashCommand) -@hf.error_handler() +@lightbulb.command("avatar", "View a member's avatar") +@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@error_handler() async def avatar(ctx: lightbulb.Context) -> None: - member: hikari.Member = ctx.options.member or ctx.member + member: hikari.Member = ctx.options.target embed = ( hikari.Embed( @@ -34,14 +35,14 @@ async def avatar(ctx: lightbulb.Context) -> None: @misc_plugin.command +@lightbulb.option("target", "The target of the command") @lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) -@lightbulb.option("member", "Get member", type=hikari.Member, required=False) @lightbulb.command("userinfo", "Get info of a user in a guild") @lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) -@hf.error_handler() +@error_handler() async def userinfo(ctx: lightbulb.Context) -> None: guild = ctx.get_guild() - member: hikari.Member = ctx.options.member or ctx.member + member: hikari.Member = ctx.options.target created_at = int(member.created_at.timestamp()) joined_at = int(member.joined_at.timestamp()) @@ -80,7 +81,7 @@ async def userinfo(ctx: lightbulb.Context) -> None: .set_footer(text=f"Requested by {ctx.author}", icon=ctx.author.avatar_url) ) - fields = [ + fields: list[tuple[str, str, bool]] = [ ("ID", member.id, True), ("Joined", f" • ", True), ("Created", f" • ", True), @@ -105,7 +106,7 @@ async def userinfo(ctx: lightbulb.Context) -> None: @lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) @lightbulb.command("serverinfo", "View info of the server") @lightbulb.implements(lightbulb.PrefixCommand, lightbulb.SlashCommand) -@hf.error_handler() +@error_handler() async def serverinfo(ctx: lightbulb.Context) -> None: guild = ctx.get_guild() members_mapping = guild.get_members() @@ -118,7 +119,7 @@ async def serverinfo(ctx: lightbulb.Context) -> None: .set_thumbnail(guild.icon_url) .set_footer(text=f"Requested by {ctx.author}", icon=ctx.author.avatar_url) ) - fields = [ + fields: list[tuple[str, str, bool]] = [ ("ID", guild.id, True), ("Owner", f"<@{guild.owner_id}>", True), ("Members", len(members), True), @@ -165,23 +166,34 @@ async def serverinfo(ctx: lightbulb.Context) -> None: @lightbulb.option("time", "Time period for the remainder") @lightbulb.command("remind", "Create a remainder") @lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) -@hf.error_handler() +@error_handler() async def remainder(ctx: lightbulb.Context) -> None: if ctx.interaction is None: remainder = " ".join(ctx.options.remainder) else: remainder = ctx.options.remainder - time = ctx.options.time - time_seconds = await convert_time(ctx, time) + time = convert_time(ctx.options.time) scheduler = fetch_scheduler(ctx) scheduler.add_job( send_remainder, "date", (ctx, remainder), - next_run_time=datetime.now() + timedelta(seconds=int(time_seconds)), + next_run_time=datetime.now() + timedelta(seconds=int(time)), + ) + + await ctx.respond( + f"Created a remainder for you! :ok_hand:\nTime: {ctx.options.time}" ) - await ctx.respond("Created a remainder for you! :ok_hand:") + +@misc_plugin.command +@lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) +@lightbulb.option("object", "Plugin or Command to search for", required=False) +@lightbulb.command("help", "Slash Command Version of help command") +@lightbulb.implements(lightbulb.SlashCommand) +@error_handler() +async def help_command(ctx: lightbulb.Context) -> None: + await ctx.bot.help_command.send_help(ctx, ctx.options.object or None) def load(bot: lightbulb.BotApp) -> None: diff --git a/peacebot/core/plugins/Miscellaneous/rtfm.py b/peacebot/core/plugins/Miscellaneous/rtfm.py old mode 100644 new mode 100755 diff --git a/peacebot/core/plugins/Music/music.py b/peacebot/core/plugins/Music/music.py old mode 100644 new mode 100755 index d21d242..18b85ef --- a/peacebot/core/plugins/Music/music.py +++ b/peacebot/core/plugins/Music/music.py @@ -80,7 +80,6 @@ async def on_timeout(self) -> None: @music_plugin.command @lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) -@lightbulb.set_help(docstring=True) @lightbulb.command("join", "Join a voice channel of the guild") @lightbulb.implements(lightbulb.PrefixCommand, lightbulb.SlashCommand) async def join(ctx: lightbulb.Context) -> None: @@ -515,6 +514,7 @@ async def nowplaying(ctx: lightbulb.Context) -> None: @music_plugin.command @lightbulb.command("clear", "Clear the queue") @lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@check_voice_state async def clear_queue(ctx: lightbulb.Context) -> None: await _leave(ctx) await _join(ctx) diff --git a/peacebot/core/utils/activity.py b/peacebot/core/utils/activity.py old mode 100644 new mode 100755 diff --git a/peacebot/core/utils/buttons.py b/peacebot/core/utils/buttons.py old mode 100644 new mode 100755 diff --git a/peacebot/core/utils/embed_colors.py b/peacebot/core/utils/embed_colors.py old mode 100644 new mode 100755 diff --git a/peacebot/core/utils/helper_functions.py b/peacebot/core/utils/helper_functions.py old mode 100644 new mode 100755 diff --git a/peacebot/core/utils/rtfm_helper.py b/peacebot/core/utils/rtfm_helper.py old mode 100644 new mode 100755 diff --git a/peacebot/core/utils/utilities.py b/peacebot/core/utils/utilities.py old mode 100644 new mode 100755 diff --git a/tortoise_config.py b/tortoise_config.py old mode 100644 new mode 100755 diff --git a/wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl b/wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl old mode 100644 new mode 100755 From 600b18a43c8bc6c8584b116434b5ad58b850a015 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:25:20 +0545 Subject: [PATCH 36/44] dependencies: update the project dependencies --- pyproject.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 452f8a4..68a64b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ python = ">=3.10,<3.11" pydantic = "^1.8.2" aerich = "0.5.3" asyncpg = "^0.24.0" -hikari-lightbulb = "^2.1.3" +hikari-lightbulb = {git = "https://github.com/tandemdude/hikari-lightbulb"} python-dotenv = "^0.19.2" tortoise-orm = "^0.17.8" aioredis = "^2.0.0" @@ -22,9 +22,11 @@ APScheduler = "^3.8.1" uvloop = "^0.16.0" aiofiles = "0.6.0" asyncpraw = "^7.5.0" -reddist = "0.1.2" -lightbulb-ext-neon = {git = "https://github.com/neonjonn/lightbulb-ext-neon"} lavasnek_rs={ file = "wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl" } +rapidfuzz = "^1.9.1" +hikari-miru = "^0.5.4" +hikari = "^2.0.0-alpha.105" +reddist = "^0.1.2" [tool.poetry.dev-dependencies] black = "^21.11b0" From ff1accff6ff363cef718924e70daba5ccb92c979 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:26:26 +0545 Subject: [PATCH 37/44] refactor: remove unnecessary imports --- models.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/models.py b/models.py index 94042ad..a55dd70 100755 --- a/models.py +++ b/models.py @@ -1,5 +1,3 @@ -from pydoc import describe - from tortoise import fields from tortoise.models import Model From 51ed54582cebf6f9d1ef578b57549b1221756cd3 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sat, 29 Jan 2022 22:38:43 +0545 Subject: [PATCH 38/44] feat: add `ban` command --- peacebot/core/plugins/Moderation/mod.py | 52 +++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index b60cdc1..05cccfd 100755 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -37,7 +37,7 @@ async def timeout(ctx: lightbulb.Context) -> None: @moderation_role_check async def timeout_enable_command(ctx: lightbulb.Context) -> None: member: hikari.Member = ctx.options.member - higher_role_check(ctx.author, member) + higher_role_check(ctx.member, member) mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) time_seconds = convert_time(ctx.options.time) @@ -78,7 +78,7 @@ async def timeout_enable_command(ctx: lightbulb.Context) -> None: @lightbulb.implements(lightbulb.SlashSubCommand, lightbulb.PrefixSubCommand) async def disable_timeout_command(ctx: lightbulb.Context) -> None: member: hikari.InteractionMember = ctx.options.member - higher_role_check(ctx.author, member) + higher_role_check(ctx.member, member) mod_logs = await mod_logs_check(ctx) now = datetime.now(timezone.utc) await member.edit(communication_disabled_until=now, reason=ctx.options.reason) @@ -115,7 +115,7 @@ async def disable_timeout_command(ctx: lightbulb.Context) -> None: @mod_role_check async def kick_command(ctx: lightbulb.Context) -> None: member: hikari.InteractionMember = ctx.options.member - higher_role_check(ctx.author, member) + higher_role_check(ctx.member, member) mod_logs = await mod_logs_check(ctx) await member.kick(reason=ctx.options.reason) embed = ( @@ -143,6 +143,52 @@ async def kick_command(ctx: lightbulb.Context) -> None: ) +@mod_plugin.command +@lightbulb.option( + "days", + "Specify number of days of messages to delete(Min - 0, Max- 7)", + required=False, + type=int, +) +@lightbulb.option("reason", "The reason to ban the member") +@lightbulb.option("member", "The member to ban", type=hikari.Member) +@lightbulb.command("ban", "Ban the member from the server") +@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@mod_role_check +async def ban_command(ctx: lightbulb.Context) -> None: + member: hikari.InteractionMember = ctx.options.member + higher_role_check(ctx.member, member) + mod_logs = await mod_logs_check(ctx) + if ctx.options.days > 7: + raise ModerationError("Cannot delete messages more than 7 days old!") + await member.ban( + delete_message_days=ctx.options.days or 0, reason=ctx.options.reason + ) + embed = ( + hikari.Embed( + description=f"🔨 Banned -> {member}\n**Reason:** {ctx.options.reason}", + color=EmbedColors.ERROR, + timestamp=datetime.now().astimezone(), + ) + .set_author( + name=f"{ctx.author}(ID {ctx.author.id})", icon=ctx.author.avatar_url + ) + .set_thumbnail(member.avatar_url) + ) + await mod_logs.send(embed=embed) + response = await ctx.respond(embed=embed) + message_link = (await response.message()).make_link(ctx.guild_id) + await register_cases( + guild_id=ctx.guild_id, + moderator=ctx.author.id, + target=member.id, + reason=ctx.options.reason, + message_link=message_link, + channel_id=ctx.channel_id, + type="Ban", + ) + + @mod_plugin.command @lightbulb.command("case", "Group for case commands") @lightbulb.implements(lightbulb.SlashCommandGroup, lightbulb.PrefixCommandGroup) From 783f72f6f9429a5264efbfcd556f2a120e268f8b Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sun, 30 Jan 2022 10:24:12 +0545 Subject: [PATCH 39/44] refactor: make `guild`a ForeignKeyField for ModLogs and ModerationRoles model --- models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index a55dd70..708d972 100755 --- a/models.py +++ b/models.py @@ -75,16 +75,17 @@ class ModerationRoles(CustomModel): moderation_role = fields.BigIntField( description="ID of the General Moderation Role", null=True ) - guild_id = fields.BigIntField(description="Guild ID") + guild = fields.ForeignKeyField("main.GuildModel", related_name="ModerationRoles") class Meta: table = "staff_roles" table_description = "Stores the roles for the moderation" + unique = "guild" class ModLogs(CustomModel): id = fields.IntField(description="ID of the Case", pk=True) - guild_id = fields.BigIntField(description="ID of the Guild") + guild = fields.ForeignKeyField("main.GuildModel", related_name="ModLogs") moderator = fields.TextField(description="Moderator that performed the action") target = fields.TextField(description="Victim of the moderation action") reason = fields.TextField(description="Reason of Moderation Action") @@ -98,3 +99,4 @@ class ModLogs(CustomModel): class Meta: table = "mod_logs" table_description = "Stores all the moderation actions" + unique = "guild" From 755f33eb60a04ac8ca5b8e7e4caca4eaacaef86b Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sun, 30 Jan 2022 10:27:37 +0545 Subject: [PATCH 40/44] dependencies: bump `hikari-miru` to v0.6.3 and use commit hash for `hikari-lightbulb` --- poetry.lock | 156 ++++++++++++++++++++++++++++++++++--------------- pyproject.toml | 4 +- 2 files changed, 112 insertions(+), 48 deletions(-) diff --git a/poetry.lock b/poetry.lock index dcfebb3..d68335a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -221,7 +221,7 @@ tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (> name = "black" version = "21.12b0" description = "The uncompromising code formatter." -category = "main" +category = "dev" optional = false python-versions = ">=3.6.2" @@ -389,11 +389,32 @@ speedups = ["aiodns (>=3.0,<4.0)", "cchardet (>=2.1,<3.0)", "Brotli (>=1.0,<2.0) [[package]] name = "hikari-lightbulb" -version = "2.1.3" +version = "2.2.0" description = "A simple to use command handler for Hikari" category = "main" optional = false python-versions = ">=3.8.0,<3.11" +develop = false + +[package.dependencies] +hikari = ">=2.0.0.dev105,<2.1.0" + +[package.extras] +crontrigger = ["croniter (>=1.2.0,<1.3.0)", "types-croniter (>=1.0.7,<1.1.0)"] + +[package.source] +type = "git" +url = "https://github.com/tandemdude/hikari-lightbulb" +reference = "0e27fce" +resolved_reference = "0e27fcee5adb5f29528085c560e35f17e926477c" + +[[package]] +name = "hikari-miru" +version = "0.6.3" +description = "An alternative component handler for hikari, inspired by discord.py's views." +category = "main" +optional = false +python-versions = ">=3.8.0,<3.11" [package.dependencies] hikari = ">=2.0.0.dev105,<2.1.0" @@ -468,40 +489,16 @@ colors = ["colorama (>=0.4.3,<0.5.0)"] plugins = ["setuptools"] [[package]] -name = "lavasnek-rs" -version = "0.1.0-alpha.3" -description = "A lavalink-rs wrapper for any python async library" -category = "main" -optional = false -python-versions = "^3.6.2" -develop = false - -[package.dependencies] -black = "^21.12b0" - -[package.source] -type = "git" -url = "https://github.com/vicky5124/lavasnek_rs" -reference = "master" -resolved_reference = "651f4c5f1f42b5b07ca27ca4ea6130520a6c5c56" - -[[package]] -name = "lightbulb-ext-neon" -version = "0.1.0" -description = "An add-on for Lightbulb making it easier to handle component interactions" +name = "lavasnek_rs" +version = "0.1.0_alpha.3" +description = "lavalink-rs bindings for Python" category = "main" optional = false -python-versions = ">=3.8.0,<3.11" -develop = false - -[package.dependencies] -hikari-lightbulb = ">=2.1.0,<2.2.0" +python-versions = "*" [package.source] -type = "git" -url = "https://github.com/neonjonn/lightbulb-ext-neon" -reference = "master" -resolved_reference = "119eb9aa015488f47764316af16e7cf1eed72a15" +type = "file" +url = "wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl" [[package]] name = "mccabe" @@ -523,7 +520,7 @@ python-versions = ">=3.6" name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "main" +category = "dev" optional = false python-versions = "*" @@ -539,7 +536,7 @@ python-versions = "*" name = "pathspec" version = "0.9.0" description = "Utility library for gitignore style pattern matching of file paths." -category = "main" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" @@ -547,7 +544,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" name = "platformdirs" version = "2.4.1" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" +category = "dev" optional = false python-versions = ">=3.7" @@ -667,13 +664,24 @@ category = "dev" optional = false python-versions = ">=3.6" +[[package]] +name = "rapidfuzz" +version = "1.9.1" +description = "rapid fuzzy string matching" +category = "main" +optional = false +python-versions = ">=2.7" + +[package.extras] +full = ["numpy"] + [[package]] name = "reddist" -version = "0.2.0a0" +version = "0.1.2" description = "Just a simple library for caching reddit posts" category = "main" optional = false -python-versions = ">=3.10,<4.0" +python-versions = ">=3.9,<3.11" [package.dependencies] aiofiles = "0.6.0" @@ -718,7 +726,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "tomli" version = "1.2.3" description = "A lil' TOML parser" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -849,7 +857,7 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = ">=3.10,<3.11" -content-hash = "04ff0020ee686020888f3e46be9fc4e871cfc0f8ce7248bf8415e95f20385b74" +content-hash = "914883b45d6ff5abde355ca0c3980d64884aed7c3330d97a03dad8ee6dc95efa" [metadata.files] aerich = [ @@ -1119,9 +1127,10 @@ hikari = [ {file = "hikari-2.0.0.dev105-py3-none-any.whl", hash = "sha256:c167e5ee4bb1bf4b4f9a0885573f45d76f6e6c0d4913304cf2962196becb4057"}, {file = "hikari-2.0.0.dev105.tar.gz", hash = "sha256:3b249c427363d26cd5b0ad2fa5f1172e4d03eceddbc27b5f0d10c991060db82c"}, ] -hikari-lightbulb = [ - {file = "hikari-lightbulb-2.1.3.tar.gz", hash = "sha256:39aecc22e2f7ee6aedb9413a9c2eb1b60f64576f98f3750744d09a2caf8e32a7"}, - {file = "hikari_lightbulb-2.1.3-py3-none-any.whl", hash = "sha256:2bb61d8663ee5247963cd5741f2313a1ef0283e70cf76f3e0bae5dcd568b3d64"}, +hikari-lightbulb = [] +hikari-miru = [ + {file = "hikari-miru-0.6.3.tar.gz", hash = "sha256:56a0521ab0cdb9b4bc645c6b7d63129e9d6ccdd3e3ea5a3b9b79ae77958e691d"}, + {file = "hikari_miru-0.6.3-py3-none-any.whl", hash = "sha256:8e8917aefcaee625a4b645cc3a3a8633b4d2c8d98716e1405189e5f1d9efdd17"}, ] hikari-yuyo = [] identify = [ @@ -1140,8 +1149,9 @@ isort = [ {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] -lavasnek-rs = [] -lightbulb-ext-neon = [] +lavasnek_rs = [ + {file = "lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl", hash = "sha256:461fee8c75dc35d7a1b3f0e2bb6783a36e8838b7a6f4c675fc424b10d952396b"}, +] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, @@ -1343,9 +1353,63 @@ pyyaml = [ {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] +rapidfuzz = [ + {file = "rapidfuzz-1.9.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:68227a8b25291d6a2140aef049271ea30a77be5ef672a58e582a55a5cc1fce93"}, + {file = "rapidfuzz-1.9.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:c33541995b96ff40025c1456b8c74b7dd2ab9cbf91943fc35a7bb621f48940e2"}, + {file = "rapidfuzz-1.9.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:c2fafbbf97a4632822248f4201601b691e2eac5fdb30e5d7a96d07a6d058a7d4"}, + {file = "rapidfuzz-1.9.1-cp27-cp27m-win32.whl", hash = "sha256:364795f617a99e1dbb55ac3947ab8366588b72531cb2d6152666287d20610706"}, + {file = "rapidfuzz-1.9.1-cp27-cp27m-win_amd64.whl", hash = "sha256:f171d9e66144b0647f9b998ef10bdd919a640e4b1357250c8ef6259deb5ffe0d"}, + {file = "rapidfuzz-1.9.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:c83801a7c5209663aa120b815a4f2c39e95fe8e0b774ec58a1e0affd6a2fcfc6"}, + {file = "rapidfuzz-1.9.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:67e61c2baa6bb1848c4a33752f1781124dcc90bf3f31b18b44db1ae4e4e26634"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8ab7eb003a18991347174910f11d38ff40399081185d9e3199ec277535f7828b"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5ad450badf06ddf98a246140b5059ba895ee8445e8102a5a289908327f551f81"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:402b2174bded62a793c5f7d9aec16bc32c661402360a934819ae72b54cfbce1e"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:92066ccb054efc2e17afb4049c98b550969653cd58f71dd756cfcc8e6864630a"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8dc0bf1814accee08a9c9bace6672ef06eae6b0446fce88e3e97e23dfaf3ea10"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdbd387efb8478605951344f327dd03bf053c138d757369a43404305b99e55db"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-win32.whl", hash = "sha256:b1c54807e556dbcc6caf4ce0f24446c01b195f3cc46e2a6e74b82d3a21eaa45d"}, + {file = "rapidfuzz-1.9.1-cp310-cp310-win_amd64.whl", hash = "sha256:ac3273364cd1619cab3bf0ba731efea5405833f9eba362da7dcd70bd42073d8e"}, + {file = "rapidfuzz-1.9.1-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:d9faf62606c08a0a6992dd480c72b6a068733ae02688dc35f2e36ba0d44673f4"}, + {file = "rapidfuzz-1.9.1-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:f6a56a48be047637b1b0b2459a11cf7cd5aa7bbe16a439bd4f73b4af39e620e4"}, + {file = "rapidfuzz-1.9.1-cp35-cp35m-win32.whl", hash = "sha256:aa91609979e9d2700f0ff100df99b36e7d700b70169ee385d43d5de9e471ae97"}, + {file = "rapidfuzz-1.9.1-cp35-cp35m-win_amd64.whl", hash = "sha256:b4cfdd0915ab4cec86c2ff6bab9f01b03454f3de0963c37f9f219df2ddf42b95"}, + {file = "rapidfuzz-1.9.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c6bfa4ad0158a093cd304f795ceefdc3861ae6942a61432b2a50858be6de88ca"}, + {file = "rapidfuzz-1.9.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:eb0ea02295d9278bd2dcd2df4760b0f2887b6c3f2f374005ec5af320d8d3a37e"}, + {file = "rapidfuzz-1.9.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d5187cd5cd6273e9fee07de493a42a2153134a4914df74cb1abb0744551c548a"}, + {file = "rapidfuzz-1.9.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f6e5b8af63f9c05b64454460759ed84a715d581d598ec4484f4ec512f398e8b1"}, + {file = "rapidfuzz-1.9.1-cp36-cp36m-win32.whl", hash = "sha256:36137f88f2b28115af506118e64e11c816611eab2434293af7fdacd1290ffb9d"}, + {file = "rapidfuzz-1.9.1-cp36-cp36m-win_amd64.whl", hash = "sha256:fcc420cad46be7c9887110edf04cdee545f26dbf22650a443d89790fc35f7b88"}, + {file = "rapidfuzz-1.9.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b06de314f426aebff8a44319016bbe2b22f7848c84e44224f80b0690b7b08b18"}, + {file = "rapidfuzz-1.9.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e5de44e719faea79e45322b037f0d4a141d750b80d2204fa68f43a42a24f0fbc"}, + {file = "rapidfuzz-1.9.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f9439df09a782afd01b67005a3b110c70bbf9e1cf06d2ac9b293ce2d02d3c549"}, + {file = "rapidfuzz-1.9.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e903d4702647465721e2d0431c95f04fd56a06577f06f41e2960c83fd63c1bad"}, + {file = "rapidfuzz-1.9.1-cp37-cp37m-win32.whl", hash = "sha256:a5298f4ac1975edcbb15583eab659a44b33aebaf3bccf172e185cfea68771c08"}, + {file = "rapidfuzz-1.9.1-cp37-cp37m-win_amd64.whl", hash = "sha256:103193a01921b54fcdad6b01cfda3a68e00aeafca236b7ecd5b1b2c2e7e96337"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:1d98a3187040dca855e02179a35c137f72ef83ce243783d44ea59efa86b94b3a"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cb92bf7fc911b787055a88d9295ca3b4fe8576e3b59271f070f1b1b181eb087d"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:3f014a0f5f8159a94c6ee884fedd1c30e07fb866a5d76ff2c18091bc6363b76f"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:31474074a99f72289ac325fbd77983e7d355d48860bfe7a4f6f6396fdb24410a"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ec67d79af5a2d7b0cf67b570a5579710e461cadda4120478e813b63491f394dd"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ebc0d3d15ed32f98f0052cf6e3e9c9b8010fb93c04fb74d2022e3c51ec540e2"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-win32.whl", hash = "sha256:477ab1a3044bab89db45caabc562b158f68765ecaa638b73ba17e92f09dfa5ff"}, + {file = "rapidfuzz-1.9.1-cp38-cp38-win_amd64.whl", hash = "sha256:8e872763dc0367d7544aa585d2e8b27af233323b8a7cd2f9b78cafa05bae5018"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8401c41e219ae36ca7a88762776a6270511650d4cc70d024ae61561e96d67e47"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ea10bd8e0436801c3264f7084a5ea194f12ba9fe1ba898aa4a2107d276501292"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:433737914b46c1ffa0c678eceae1c260dc6b7fb5b6cad4c725d3e3607c764b32"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:8c3b08e90e45acbc469d1f456681643256e952bf84ec7714f58979baba0c8a1c"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:bbcd265b3c86176e5db4cbba7b4364d7333c214ee80e2d259c7085929934ca9d"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3d69fabcd635783cd842e7d5ee4b77164314c5124b82df5a0c436ab3d698f8a9"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-win32.whl", hash = "sha256:01f16b6f3fa5d1a26c12f5da5de0032f1e12c919d876005b57492a8ec9a5c043"}, + {file = "rapidfuzz-1.9.1-cp39-cp39-win_amd64.whl", hash = "sha256:0bcc5bbfdbe6068cc2cf0029ab6cde08dceac498d232fa3a61dd34fbfa0b3f36"}, + {file = "rapidfuzz-1.9.1-pp27-pypy_73-manylinux2010_x86_64.whl", hash = "sha256:de869c8f4e8edb9b2f7b8232a04896645501defcbd9d85bc0202ff3ec6285f6b"}, + {file = "rapidfuzz-1.9.1-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:db5978e970fb0955974d51021da4b929e2e4890fef17792989ee32658e2b159c"}, + {file = "rapidfuzz-1.9.1-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:33479f75f36ac3a1d8421365d4fa906e013490790730a89caba31d06e6f71738"}, + {file = "rapidfuzz-1.9.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:af991cb333ec526d894923163050931b3a870b7694bf7687aaa6154d341a98f5"}, + {file = "rapidfuzz-1.9.1.tar.gz", hash = "sha256:bd7a4fe33ba49db3417f0f57a8af02462554f1296dedcf35b026cd3525efef74"}, +] reddist = [ - {file = "reddist-0.2.0a0-py3-none-any.whl", hash = "sha256:d445853373d1d9ce84904be760c59a06033d3d8bf8a4af0088a39c2388082ba4"}, - {file = "reddist-0.2.0a0.tar.gz", hash = "sha256:8c14b9c167ac8d2fecb61136f6f0b97915579563ef36f88a3f195e65f7fed94e"}, + {file = "reddist-0.1.2-py3-none-any.whl", hash = "sha256:0ea007dc4bd510412382c071b46416e58ae5a2e640ad90d1340301d734936bcf"}, + {file = "reddist-0.1.2.tar.gz", hash = "sha256:14d836addb64b83f26e96c20f883ce5fcbd9f06b064e2bb5fbdc066d58a1114d"}, ] requests = [ {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, diff --git a/pyproject.toml b/pyproject.toml index 68a64b1..fa2bb6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ python = ">=3.10,<3.11" pydantic = "^1.8.2" aerich = "0.5.3" asyncpg = "^0.24.0" -hikari-lightbulb = {git = "https://github.com/tandemdude/hikari-lightbulb"} +hikari-lightbulb = {git = "https://github.com/tandemdude/hikari-lightbulb", rev = "0e27fce"} python-dotenv = "^0.19.2" tortoise-orm = "^0.17.8" aioredis = "^2.0.0" @@ -24,7 +24,7 @@ aiofiles = "0.6.0" asyncpraw = "^7.5.0" lavasnek_rs={ file = "wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl" } rapidfuzz = "^1.9.1" -hikari-miru = "^0.5.4" +hikari-miru = "^0.6.3" hikari = "^2.0.0-alpha.105" reddist = "^0.1.2" From 25912ca45e62d07f5501c92b2e84318124d8348c Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sun, 30 Jan 2022 11:09:06 +0545 Subject: [PATCH 41/44] dependencies: use commit hash for `hikari` since only using hash for lightbulb would break it --- poetry.lock | 153 +++++++++++++++++++++++-------------------------- pyproject.toml | 2 +- 2 files changed, 73 insertions(+), 82 deletions(-) diff --git a/poetry.lock b/poetry.lock index d68335a..0c52766 100644 --- a/poetry.lock +++ b/poetry.lock @@ -371,22 +371,29 @@ python-versions = ">=3.6" [[package]] name = "hikari" -version = "2.0.0.dev105" +version = "2.0.0.dev106" description = "A sane Discord API for Python 3 built on asyncio and good intentions" category = "main" optional = false python-versions = ">=3.8.0,<3.11" +develop = false [package.dependencies] aiohttp = ">=3.8,<4.0" attrs = ">=21.4,<22.0" colorlog = ">=6.6,<7.0" -multidict = ">=5.2,<6.0" +multidict = ">=6.0,<7.0" pure25519 = "0.0.1" [package.extras] speedups = ["aiodns (>=3.0,<4.0)", "cchardet (>=2.1,<3.0)", "Brotli (>=1.0,<2.0)", "ciso8601 (>=2.2,<3.0)", "ed25519 (>=1.5,<2.0)"] +[package.source] +type = "git" +url = "https://github.com/hikari-py/hikari" +reference = "38e9874" +resolved_reference = "38e987414235d60594d69c9034f652d823492257" + [[package]] name = "hikari-lightbulb" version = "2.2.0" @@ -510,11 +517,11 @@ python-versions = "*" [[package]] name = "multidict" -version = "5.2.0" +version = "6.0.2" description = "multidict implementation" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "mypy-extensions" @@ -857,7 +864,7 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = ">=3.10,<3.11" -content-hash = "914883b45d6ff5abde355ca0c3980d64884aed7c3330d97a03dad8ee6dc95efa" +content-hash = "dae71b8059eee9e2ebfc35a35f829dec5abef322fe110677f06f548c15879b23" [metadata.files] aerich = [ @@ -1123,10 +1130,7 @@ frozenlist = [ {file = "frozenlist-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:735f386ec522e384f511614c01d2ef9cf799f051353876b4c6fb93ef67a6d1ee"}, {file = "frozenlist-1.2.0.tar.gz", hash = "sha256:68201be60ac56aff972dc18085800b6ee07973c49103a8aba669dee3d71079de"}, ] -hikari = [ - {file = "hikari-2.0.0.dev105-py3-none-any.whl", hash = "sha256:c167e5ee4bb1bf4b4f9a0885573f45d76f6e6c0d4913304cf2962196becb4057"}, - {file = "hikari-2.0.0.dev105.tar.gz", hash = "sha256:3b249c427363d26cd5b0ad2fa5f1172e4d03eceddbc27b5f0d10c991060db82c"}, -] +hikari = [] hikari-lightbulb = [] hikari-miru = [ {file = "hikari-miru-0.6.3.tar.gz", hash = "sha256:56a0521ab0cdb9b4bc645c6b7d63129e9d6ccdd3e3ea5a3b9b79ae77958e691d"}, @@ -1157,78 +1161,65 @@ mccabe = [ {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] multidict = [ - {file = "multidict-5.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3822c5894c72e3b35aae9909bef66ec83e44522faf767c0ad39e0e2de11d3b55"}, - {file = "multidict-5.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:28e6d883acd8674887d7edc896b91751dc2d8e87fbdca8359591a13872799e4e"}, - {file = "multidict-5.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b61f85101ef08cbbc37846ac0e43f027f7844f3fade9b7f6dd087178caedeee7"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d9b668c065968c5979fe6b6fa6760bb6ab9aeb94b75b73c0a9c1acf6393ac3bf"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:517d75522b7b18a3385726b54a081afd425d4f41144a5399e5abd97ccafdf36b"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1b4ac3ba7a97b35a5ccf34f41b5a8642a01d1e55454b699e5e8e7a99b5a3acf5"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:df23c83398715b26ab09574217ca21e14694917a0c857e356fd39e1c64f8283f"}, - {file = "multidict-5.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e58a9b5cc96e014ddf93c2227cbdeca94b56a7eb77300205d6e4001805391747"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f76440e480c3b2ca7f843ff8a48dc82446b86ed4930552d736c0bac507498a52"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:cfde464ca4af42a629648c0b0d79b8f295cf5b695412451716531d6916461628"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:0fed465af2e0eb6357ba95795d003ac0bdb546305cc2366b1fc8f0ad67cc3fda"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b70913cbf2e14275013be98a06ef4b412329fe7b4f83d64eb70dce8269ed1e1a"}, - {file = "multidict-5.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a5635bcf1b75f0f6ef3c8a1ad07b500104a971e38d3683167b9454cb6465ac86"}, - {file = "multidict-5.2.0-cp310-cp310-win32.whl", hash = "sha256:77f0fb7200cc7dedda7a60912f2059086e29ff67cefbc58d2506638c1a9132d7"}, - {file = "multidict-5.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:9416cf11bcd73c861267e88aea71e9fcc35302b3943e45e1dbb4317f91a4b34f"}, - {file = "multidict-5.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fd77c8f3cba815aa69cb97ee2b2ef385c7c12ada9c734b0f3b32e26bb88bbf1d"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:98ec9aea6223adf46999f22e2c0ab6cf33f5914be604a404f658386a8f1fba37"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e5283c0a00f48e8cafcecadebfa0ed1dac8b39e295c7248c44c665c16dc1138b"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5f79c19c6420962eb17c7e48878a03053b7ccd7b69f389d5831c0a4a7f1ac0a1"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:e4a67f1080123de76e4e97a18d10350df6a7182e243312426d508712e99988d4"}, - {file = "multidict-5.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:94b117e27efd8e08b4046c57461d5a114d26b40824995a2eb58372b94f9fca02"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:2e77282fd1d677c313ffcaddfec236bf23f273c4fba7cdf198108f5940ae10f5"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:116347c63ba049c1ea56e157fa8aa6edaf5e92925c9b64f3da7769bdfa012858"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:dc3a866cf6c13d59a01878cd806f219340f3e82eed514485e094321f24900677"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:ac42181292099d91217a82e3fa3ce0e0ddf3a74fd891b7c2b347a7f5aa0edded"}, - {file = "multidict-5.2.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:f0bb0973f42ffcb5e3537548e0767079420aefd94ba990b61cf7bb8d47f4916d"}, - {file = "multidict-5.2.0-cp36-cp36m-win32.whl", hash = "sha256:ea21d4d5104b4f840b91d9dc8cbc832aba9612121eaba503e54eaab1ad140eb9"}, - {file = "multidict-5.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:e6453f3cbeb78440747096f239d282cc57a2997a16b5197c9bc839099e1633d0"}, - {file = "multidict-5.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d3def943bfd5f1c47d51fd324df1e806d8da1f8e105cc7f1c76a1daf0f7e17b0"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35591729668a303a02b06e8dba0eb8140c4a1bfd4c4b3209a436a02a5ac1de11"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce8cacda0b679ebc25624d5de66c705bc53dcc7c6f02a7fb0f3ca5e227d80422"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:baf1856fab8212bf35230c019cde7c641887e3fc08cadd39d32a421a30151ea3"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a43616aec0f0d53c411582c451f5d3e1123a68cc7b3475d6f7d97a626f8ff90d"}, - {file = "multidict-5.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:25cbd39a9029b409167aa0a20d8a17f502d43f2efebfe9e3ac019fe6796c59ac"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:0a2cbcfbea6dc776782a444db819c8b78afe4db597211298dd8b2222f73e9cd0"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3d2d7d1fff8e09d99354c04c3fd5b560fb04639fd45926b34e27cfdec678a704"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:a37e9a68349f6abe24130846e2f1d2e38f7ddab30b81b754e5a1fde32f782b23"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:637c1896497ff19e1ee27c1c2c2ddaa9f2d134bbb5e0c52254361ea20486418d"}, - {file = "multidict-5.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:9815765f9dcda04921ba467957be543423e5ec6a1136135d84f2ae092c50d87b"}, - {file = "multidict-5.2.0-cp37-cp37m-win32.whl", hash = "sha256:8b911d74acdc1fe2941e59b4f1a278a330e9c34c6c8ca1ee21264c51ec9b67ef"}, - {file = "multidict-5.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:380b868f55f63d048a25931a1632818f90e4be71d2081c2338fcf656d299949a"}, - {file = "multidict-5.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e7d81ce5744757d2f05fc41896e3b2ae0458464b14b5a2c1e87a6a9d69aefaa8"}, - {file = "multidict-5.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2d1d55cdf706ddc62822d394d1df53573d32a7a07d4f099470d3cb9323b721b6"}, - {file = "multidict-5.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4771d0d0ac9d9fe9e24e33bed482a13dfc1256d008d101485fe460359476065"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da7d57ea65744d249427793c042094c4016789eb2562576fb831870f9c878d9e"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cdd68778f96216596218b4e8882944d24a634d984ee1a5a049b300377878fa7c"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ecc99bce8ee42dcad15848c7885197d26841cb24fa2ee6e89d23b8993c871c64"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:067150fad08e6f2dd91a650c7a49ba65085303fcc3decbd64a57dc13a2733031"}, - {file = "multidict-5.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:78c106b2b506b4d895ddc801ff509f941119394b89c9115580014127414e6c2d"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e6c4fa1ec16e01e292315ba76eb1d012c025b99d22896bd14a66628b245e3e01"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:b227345e4186809d31f22087d0265655114af7cda442ecaf72246275865bebe4"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:06560fbdcf22c9387100979e65b26fba0816c162b888cb65b845d3def7a54c9b"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:7878b61c867fb2df7a95e44b316f88d5a3742390c99dfba6c557a21b30180cac"}, - {file = "multidict-5.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:246145bff76cc4b19310f0ad28bd0769b940c2a49fc601b86bfd150cbd72bb22"}, - {file = "multidict-5.2.0-cp38-cp38-win32.whl", hash = "sha256:c30ac9f562106cd9e8071c23949a067b10211917fdcb75b4718cf5775356a940"}, - {file = "multidict-5.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:f19001e790013ed580abfde2a4465388950728861b52f0da73e8e8a9418533c0"}, - {file = "multidict-5.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c1ff762e2ee126e6f1258650ac641e2b8e1f3d927a925aafcfde943b77a36d24"}, - {file = "multidict-5.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bd6c9c50bf2ad3f0448edaa1a3b55b2e6866ef8feca5d8dbec10ec7c94371d21"}, - {file = "multidict-5.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fc66d4016f6e50ed36fb39cd287a3878ffcebfa90008535c62e0e90a7ab713ae"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9acb76d5f3dd9421874923da2ed1e76041cb51b9337fd7f507edde1d86535d6"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dfc924a7e946dd3c6360e50e8f750d51e3ef5395c95dc054bc9eab0f70df4f9c"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32fdba7333eb2351fee2596b756d730d62b5827d5e1ab2f84e6cbb287cc67fe0"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:b9aad49466b8d828b96b9e3630006234879c8d3e2b0a9d99219b3121bc5cdb17"}, - {file = "multidict-5.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:93de39267c4c676c9ebb2057e98a8138bade0d806aad4d864322eee0803140a0"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f9bef5cff994ca3026fcc90680e326d1a19df9841c5e3d224076407cc21471a1"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:5f841c4f14331fd1e36cbf3336ed7be2cb2a8f110ce40ea253e5573387db7621"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:38ba256ee9b310da6a1a0f013ef4e422fca30a685bcbec86a969bd520504e341"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:3bc3b1621b979621cee9f7b09f024ec76ec03cc365e638126a056317470bde1b"}, - {file = "multidict-5.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6ee908c070020d682e9b42c8f621e8bb10c767d04416e2ebe44e37d0f44d9ad5"}, - {file = "multidict-5.2.0-cp39-cp39-win32.whl", hash = "sha256:1c7976cd1c157fa7ba5456ae5d31ccdf1479680dc9b8d8aa28afabc370df42b8"}, - {file = "multidict-5.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:c9631c642e08b9fff1c6255487e62971d8b8e821808ddd013d8ac058087591ac"}, - {file = "multidict-5.2.0.tar.gz", hash = "sha256:0dd1c93edb444b33ba2274b66f63def8a327d607c6c790772f448a53b6ea59ce"}, + {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b9e95a740109c6047602f4db4da9949e6c5945cefbad34a1299775ddc9a62e2"}, + {file = "multidict-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac0e27844758d7177989ce406acc6a83c16ed4524ebc363c1f748cba184d89d3"}, + {file = "multidict-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:041b81a5f6b38244b34dc18c7b6aba91f9cdaf854d9a39e5ff0b58e2b5773b9c"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fdda29a3c7e76a064f2477c9aab1ba96fd94e02e386f1e665bca1807fc5386f"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3368bf2398b0e0fcbf46d85795adc4c259299fec50c1416d0f77c0a843a3eed9"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4f052ee022928d34fe1f4d2bc743f32609fb79ed9c49a1710a5ad6b2198db20"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:225383a6603c086e6cef0f2f05564acb4f4d5f019a4e3e983f572b8530f70c88"}, + {file = "multidict-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50bd442726e288e884f7be9071016c15a8742eb689a593a0cac49ea093eef0a7"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:47e6a7e923e9cada7c139531feac59448f1f47727a79076c0b1ee80274cd8eee"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0556a1d4ea2d949efe5fd76a09b4a82e3a4a30700553a6725535098d8d9fb672"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:626fe10ac87851f4cffecee161fc6f8f9853f0f6f1035b59337a51d29ff3b4f9"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:8064b7c6f0af936a741ea1efd18690bacfbae4078c0c385d7c3f611d11f0cf87"}, + {file = "multidict-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2d36e929d7f6a16d4eb11b250719c39560dd70545356365b494249e2186bc389"}, + {file = "multidict-6.0.2-cp310-cp310-win32.whl", hash = "sha256:fcb91630817aa8b9bc4a74023e4198480587269c272c58b3279875ed7235c293"}, + {file = "multidict-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:8cbf0132f3de7cc6c6ce00147cc78e6439ea736cee6bca4f068bcf892b0fd658"}, + {file = "multidict-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:05f6949d6169878a03e607a21e3b862eaf8e356590e8bdae4227eedadacf6e51"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2c2e459f7050aeb7c1b1276763364884595d47000c1cddb51764c0d8976e608"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d0509e469d48940147e1235d994cd849a8f8195e0bca65f8f5439c56e17872a3"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:514fe2b8d750d6cdb4712346a2c5084a80220821a3e91f3f71eec11cf8d28fd4"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19adcfc2a7197cdc3987044e3f415168fc5dc1f720c932eb1ef4f71a2067e08b"}, + {file = "multidict-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9d153e7f1f9ba0b23ad1568b3b9e17301e23b042c23870f9ee0522dc5cc79e8"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:aef9cc3d9c7d63d924adac329c33835e0243b5052a6dfcbf7732a921c6e918ba"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4571f1beddff25f3e925eea34268422622963cd8dc395bb8778eb28418248e43"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:d48b8ee1d4068561ce8033d2c344cf5232cb29ee1a0206a7b828c79cbc5982b8"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:45183c96ddf61bf96d2684d9fbaf6f3564d86b34cb125761f9a0ef9e36c1d55b"}, + {file = "multidict-6.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:75bdf08716edde767b09e76829db8c1e5ca9d8bb0a8d4bd94ae1eafe3dac5e15"}, + {file = "multidict-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:a45e1135cb07086833ce969555df39149680e5471c04dfd6a915abd2fc3f6dbc"}, + {file = "multidict-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6f3cdef8a247d1eafa649085812f8a310e728bdf3900ff6c434eafb2d443b23a"}, + {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:0327292e745a880459ef71be14e709aaea2f783f3537588fb4ed09b6c01bca60"}, + {file = "multidict-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e875b6086e325bab7e680e4316d667fc0e5e174bb5611eb16b3ea121c8951b86"}, + {file = "multidict-6.0.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:feea820722e69451743a3d56ad74948b68bf456984d63c1a92e8347b7b88452d"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9cc57c68cb9139c7cd6fc39f211b02198e69fb90ce4bc4a094cf5fe0d20fd8b0"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:497988d6b6ec6ed6f87030ec03280b696ca47dbf0648045e4e1d28b80346560d"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89171b2c769e03a953d5969b2f272efa931426355b6c0cb508022976a17fd376"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684133b1e1fe91eda8fa7447f137c9490a064c6b7f392aa857bba83a28cfb693"}, + {file = "multidict-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd9fc9c4849a07f3635ccffa895d57abce554b467d611a5009ba4f39b78a8849"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e07c8e79d6e6fd37b42f3250dba122053fddb319e84b55dd3a8d6446e1a7ee49"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4070613ea2227da2bfb2c35a6041e4371b0af6b0be57f424fe2318b42a748516"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:47fbeedbf94bed6547d3aa632075d804867a352d86688c04e606971595460227"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:5774d9218d77befa7b70d836004a768fb9aa4fdb53c97498f4d8d3f67bb9cfa9"}, + {file = "multidict-6.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2957489cba47c2539a8eb7ab32ff49101439ccf78eab724c828c1a54ff3ff98d"}, + {file = "multidict-6.0.2-cp38-cp38-win32.whl", hash = "sha256:e5b20e9599ba74391ca0cfbd7b328fcc20976823ba19bc573983a25b32e92b57"}, + {file = "multidict-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:8004dca28e15b86d1b1372515f32eb6f814bdf6f00952699bdeb541691091f96"}, + {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2e4a0785b84fb59e43c18a015ffc575ba93f7d1dbd272b4cdad9f5134b8a006c"}, + {file = "multidict-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6701bf8a5d03a43375909ac91b6980aea74b0f5402fbe9428fc3f6edf5d9677e"}, + {file = "multidict-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a007b1638e148c3cfb6bf0bdc4f82776cef0ac487191d093cdc316905e504071"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07a017cfa00c9890011628eab2503bee5872f27144936a52eaab449be5eaf032"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c207fff63adcdf5a485969131dc70e4b194327666b7e8a87a97fbc4fd80a53b2"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:373ba9d1d061c76462d74e7de1c0c8e267e9791ee8cfefcf6b0b2495762c370c"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfba7c6d5d7c9099ba21f84662b037a0ffd4a5e6b26ac07d19e423e6fdf965a9"}, + {file = "multidict-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:19d9bad105dfb34eb539c97b132057a4e709919ec4dd883ece5838bcbf262b80"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:de989b195c3d636ba000ee4281cd03bb1234635b124bf4cd89eeee9ca8fcb09d"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7c40b7bbece294ae3a87c1bc2abff0ff9beef41d14188cda94ada7bcea99b0fb"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:d16cce709ebfadc91278a1c005e3c17dd5f71f5098bfae1035149785ea6e9c68"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:a2c34a93e1d2aa35fbf1485e5010337c72c6791407d03aa5f4eed920343dd360"}, + {file = "multidict-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:feba80698173761cddd814fa22e88b0661e98cb810f9f986c54aa34d281e4937"}, + {file = "multidict-6.0.2-cp39-cp39-win32.whl", hash = "sha256:23b616fdc3c74c9fe01d76ce0d1ce872d2d396d8fa8e4899398ad64fb5aa214a"}, + {file = "multidict-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:4bae31803d708f6f15fd98be6a6ac0b6958fcf68fda3c77a048a4f9073704aae"}, + {file = "multidict-6.0.2.tar.gz", hash = "sha256:5ff3bd75f38e4c43f1f470f2df7a4d430b821c4ce22be384e1459cb57d6bb013"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, diff --git a/pyproject.toml b/pyproject.toml index fa2bb6d..c80f790 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ asyncpraw = "^7.5.0" lavasnek_rs={ file = "wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl" } rapidfuzz = "^1.9.1" hikari-miru = "^0.6.3" -hikari = "^2.0.0-alpha.105" +hikari = {git = "https://github.com/hikari-py/hikari", rev = "38e9874"} reddist = "^0.1.2" [tool.poetry.dev-dependencies] From 27f5daf63565f810b8927803e348f635262d5f73 Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sun, 30 Jan 2022 11:09:55 +0545 Subject: [PATCH 42/44] refactor: change `avatar` and `userinfo` command to Context Menu commands --- peacebot/core/plugins/Miscellaneous/misc.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/peacebot/core/plugins/Miscellaneous/misc.py b/peacebot/core/plugins/Miscellaneous/misc.py index 3af1999..7b8e9df 100755 --- a/peacebot/core/plugins/Miscellaneous/misc.py +++ b/peacebot/core/plugins/Miscellaneous/misc.py @@ -15,10 +15,10 @@ @misc_plugin.command @lightbulb.option("target", "The target of this command", type=hikari.Member) @lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) -@lightbulb.command("avatar", "View a member's avatar") -@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@lightbulb.command("Avatar", "View a member's avatar") +@lightbulb.implements(lightbulb.UserCommand) @error_handler() -async def avatar(ctx: lightbulb.Context) -> None: +async def avatar(ctx: lightbulb.UserContext) -> None: member: hikari.Member = ctx.options.target embed = ( @@ -35,12 +35,11 @@ async def avatar(ctx: lightbulb.Context) -> None: @misc_plugin.command -@lightbulb.option("target", "The target of the command") @lightbulb.add_cooldown(1, 5, lightbulb.UserBucket) -@lightbulb.command("userinfo", "Get info of a user in a guild") -@lightbulb.implements(lightbulb.SlashCommand, lightbulb.PrefixCommand) +@lightbulb.command("Userinfo", "Get info of a user in a guild") +@lightbulb.implements(lightbulb.UserCommand) @error_handler() -async def userinfo(ctx: lightbulb.Context) -> None: +async def userinfo(ctx: lightbulb.UserContext) -> None: guild = ctx.get_guild() member: hikari.Member = ctx.options.target From 4d0a4c7076406fdf77fdf4dc1bf503cefd13aeae Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Thu, 3 Feb 2022 09:47:34 +0545 Subject: [PATCH 43/44] refactor: change from f-strings to format in the case list command Also changed the paginator from Lightbulb to Miru --- peacebot/core/plugins/Moderation/mod.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/peacebot/core/plugins/Moderation/mod.py b/peacebot/core/plugins/Moderation/mod.py index 05cccfd..6ee1eba 100755 --- a/peacebot/core/plugins/Moderation/mod.py +++ b/peacebot/core/plugins/Moderation/mod.py @@ -2,7 +2,7 @@ import hikari import lightbulb -from lightbulb.utils import nav +from miru.ext import nav from models import ModLogs from peacebot.core.utils.embed_colors import EmbedColors @@ -237,18 +237,24 @@ async def case_list_command(ctx: lightbulb.Context) -> None: raise ModerationError("No Cases could be found for the guild!") cases = [ - f"#{model.id} - -> {model.moderator}\n**Type**: ```{model.type}```" + "#{0} - -> {2}\n**Type**: ```{3}```".format( + model.id, + int(model.timestamp.timestamp()), + model.moderator, + model.type, + ) for (_, model) in enumerate(case_model) ] - fields = ( + fields = [ hikari.Embed( title="List of Cases", description="\n".join(case), color=EmbedColors.INFO ).set_footer(text=f"Page: {index + 1}") for index, case in enumerate(_chunk(cases, 5)) - ) + ] - navigator = nav.ButtonNavigator(iter(fields)) - await navigator.run(ctx) + navigator = nav.NavigatorView(app=ctx.bot, pages=fields) + await navigator.send(ctx.interaction or ctx.channel_id) + await navigator.wait() def load(bot: lightbulb.BotApp) -> None: From 21af4a065dc39e8df2a5d957e8e804c0c4e3b5fb Mon Sep 17 00:00:00 2001 From: Nishant Sapkota Date: Sun, 13 Mar 2022 19:14:58 +0545 Subject: [PATCH 44/44] dependencies: update all the dependencies to their latest version --- .pre-commit-config.yaml | 0 poetry.lock | 324 ++++++++++++++++++++-------------------- pyproject.toml | 6 +- 3 files changed, 165 insertions(+), 165 deletions(-) mode change 100644 => 100755 .pre-commit-config.yaml mode change 100644 => 100755 poetry.lock mode change 100644 => 100755 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml old mode 100644 new mode 100755 diff --git a/poetry.lock b/poetry.lock old mode 100644 new mode 100755 index 0c52766..95146bd --- a/poetry.lock +++ b/poetry.lock @@ -84,7 +84,7 @@ typing_extensions = ">=3.7.2" [[package]] name = "apscheduler" -version = "3.8.1" +version = "3.9.1" description = "In-process task scheduler with Cron-like capabilities" category = "main" optional = false @@ -103,18 +103,18 @@ mongodb = ["pymongo (>=3.0)"] redis = ["redis (>=3.0)"] rethinkdb = ["rethinkdb (>=2.4.0)"] sqlalchemy = ["sqlalchemy (>=0.8)"] -testing = ["pytest (<6)", "pytest-cov", "pytest-tornado5", "mock", "pytest-asyncio (<0.6)", "pytest-asyncio"] +testing = ["pytest", "pytest-cov", "pytest-tornado5", "mock", "pytest-asyncio (<0.6)", "pytest-asyncio"] tornado = ["tornado (>=4.3)"] twisted = ["twisted"] zookeeper = ["kazoo"] [[package]] name = "asgiref" -version = "3.4.1" +version = "3.5.0" description = "ASGI specs, helper code, and adapters" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] @@ -221,7 +221,7 @@ tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (> name = "black" version = "21.12b0" description = "The uncompromising code formatter." -category = "dev" +category = "main" optional = false python-versions = ">=3.6.2" @@ -261,7 +261,7 @@ python-versions = ">=3.6.1" [[package]] name = "charset-normalizer" -version = "2.0.10" +version = "2.0.12" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false @@ -272,7 +272,7 @@ unicode_backport = ["unicodedata2"] [[package]] name = "click" -version = "8.0.3" +version = "8.0.4" description = "Composable command line interface toolkit" category = "main" optional = false @@ -338,7 +338,7 @@ python-versions = "*" [[package]] name = "filelock" -version = "3.4.2" +version = "3.6.0" description = "A platform independent file lock." category = "dev" optional = false @@ -363,36 +363,29 @@ pyflakes = ">=2.4.0,<2.5.0" [[package]] name = "frozenlist" -version = "1.2.0" +version = "1.3.0" description = "A list-like structure which implements collections.abc.MutableSequence" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "hikari" -version = "2.0.0.dev106" +version = "2.0.0.dev107" description = "A sane Discord API for Python 3 built on asyncio and good intentions" category = "main" optional = false python-versions = ">=3.8.0,<3.11" -develop = false [package.dependencies] aiohttp = ">=3.8,<4.0" attrs = ">=21.4,<22.0" colorlog = ">=6.6,<7.0" multidict = ">=6.0,<7.0" -pure25519 = "0.0.1" [package.extras] -speedups = ["aiodns (>=3.0,<4.0)", "cchardet (>=2.1,<3.0)", "Brotli (>=1.0,<2.0)", "ciso8601 (>=2.2,<3.0)", "ed25519 (>=1.5,<2.0)"] - -[package.source] -type = "git" -url = "https://github.com/hikari-py/hikari" -reference = "38e9874" -resolved_reference = "38e987414235d60594d69c9034f652d823492257" +server = ["pynacl (>=1.5,<2.0)"] +speedups = ["aiodns (>=3.0,<4.0)", "cchardet (>=2.1,<3.0)", "Brotli (>=1.0,<2.0)", "ciso8601 (>=2.2,<3.0)"] [[package]] name = "hikari-lightbulb" @@ -401,20 +394,13 @@ description = "A simple to use command handler for Hikari" category = "main" optional = false python-versions = ">=3.8.0,<3.11" -develop = false [package.dependencies] -hikari = ">=2.0.0.dev105,<2.1.0" +hikari = ">=2.0.0.dev106,<2.1.0" [package.extras] crontrigger = ["croniter (>=1.2.0,<1.3.0)", "types-croniter (>=1.0.7,<1.1.0)"] -[package.source] -type = "git" -url = "https://github.com/tandemdude/hikari-lightbulb" -reference = "0e27fce" -resolved_reference = "0e27fcee5adb5f29528085c560e35f17e926477c" - [[package]] name = "hikari-miru" version = "0.6.3" @@ -440,27 +426,27 @@ asgiref = ">=3.0,<4.0" hikari = ">=2.0.0.dev102,<2.1.0" [package.extras] -docs = ["pdoc (==8.2.0)"] -flake8 = ["flake8 (==4.0.1)", "flake8-bandit (==2.1.2)", "flake8-black (==0.2.3)", "flake8-broken-line (==0.4)", "flake8-builtins (==1.5.3)", "flake8-coding (==1.3.2)", "flake8-comprehensions (==3.8)", "flake8-deprecated (==1.3)", "flake8-executable (==2.1.1)", "flake8-fixme (==1.1.1)", "flake8-functions (==0.0.6)", "flake8-html (==0.4.1)", "flake8-if-statements (==0.1)", "flake8-isort (==4.1.1)", "flake8-mutable (==1.2)", "flake8-pep3101 (==1.3)", "flake8-print (==4)", "flake8-printf-formatting (==1.1.2)", "flake8-pytest-style (==1.6.0)", "flake8-raise (==0.0.5)"] +docs = ["pdoc (==9.0.1)"] +flake8 = ["flake8 (==4.0.1)", "flake8-bandit (==2.1.2)", "flake8-black (==0.2.4)", "flake8-broken-line (==0.4)", "flake8-builtins (==1.5.3)", "flake8-coding (==1.3.2)", "flake8-comprehensions (==3.8)", "flake8-deprecated (==1.3)", "flake8-executable (==2.1.1)", "flake8-fixme (==1.1.1)", "flake8-functions (==0.0.6)", "flake8-html (==0.4.1)", "flake8-if-statements (==0.1)", "flake8-isort (==4.1.1)", "flake8-mutable (==1.2)", "flake8-pep3101 (==1.3)", "flake8-print (==4)", "flake8-printf-formatting (==1.1.2)", "flake8-pytest-style (==1.6.0)", "flake8-raise (==0.0.5)"] lint = ["codespell (==2.1)"] publish = ["flit (==3.6.0)"] -reformat = ["black (==21.12b0)", "isort (==5.10.1)"] -tests = ["pytest (==6.2.5)", "pytest-asyncio (==0.17)", "pytest-cov (==3)"] +reformat = ["black (==22.1)", "isort (==5.10.1)"] +tests = ["pytest (==6.2.5)", "pytest-asyncio (==0.17.2)", "pytest-cov (==3)"] type_checking = ["pyright (==0.0.13)"] [package.source] type = "git" url = "https://github.com/FasterSpeeding/Yuyo" reference = "master" -resolved_reference = "6ac1b667aa84d43a6b6d2ca4785d08f5934d8e94" +resolved_reference = "eb2ca95e52e375d00815e023c6e49f583de41cd2" [[package]] name = "identify" -version = "2.4.4" +version = "2.4.11" description = "File identification library for Python" category = "dev" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.7" [package.extras] license = ["ukkonen"] @@ -496,16 +482,15 @@ colors = ["colorama (>=0.4.3,<0.5.0)"] plugins = ["setuptools"] [[package]] -name = "lavasnek_rs" -version = "0.1.0_alpha.3" -description = "lavalink-rs bindings for Python" +name = "lavasnek-rs" +version = "0.1.0a4" +description = "A lavalink-rs wrapper for any python async library" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" -[package.source] -type = "file" -url = "wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl" +[package.dependencies] +black = ">=21.12b0,<22.0" [[package]] name = "mccabe" @@ -527,7 +512,7 @@ python-versions = ">=3.7" name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" +category = "main" optional = false python-versions = "*" @@ -543,15 +528,15 @@ python-versions = "*" name = "pathspec" version = "0.9.0" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] name = "platformdirs" -version = "2.4.1" +version = "2.5.1" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" +category = "main" optional = false python-versions = ">=3.7" @@ -561,7 +546,7 @@ test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock [[package]] name = "pre-commit" -version = "2.16.0" +version = "2.17.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false @@ -575,14 +560,6 @@ pyyaml = ">=5.1" toml = "*" virtualenv = ">=20.0.8" -[[package]] -name = "pure25519" -version = "0.0.1" -description = "pure-python curve25519/ed25519 routines" -category = "main" -optional = false -python-versions = "*" - [[package]] name = "pycodestyle" version = "2.8.0" @@ -616,7 +593,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pyparsing" -version = "3.0.6" +version = "3.0.7" description = "Python parsing module" category = "main" optional = false @@ -733,7 +710,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" name = "tomli" version = "1.2.3" description = "A lil' TOML parser" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" @@ -759,7 +736,7 @@ accel = ["ciso8601 (>=2.1.2,<3.0.0)", "python-rapidjson", "uvloop (>=0.14.0,<0.1 [[package]] name = "typing-extensions" -version = "4.0.1" +version = "4.1.1" description = "Backported and Experimental Type Hints for Python 3.6+" category = "main" optional = false @@ -833,7 +810,7 @@ test = ["aiohttp", "flake8 (>=3.9.2,<3.10.0)", "psutil", "pycodestyle (>=2.7.0,< [[package]] name = "virtualenv" -version = "20.13.0" +version = "20.13.3" description = "Virtual Python Environment builder" category = "dev" optional = false @@ -864,7 +841,7 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = ">=3.10,<3.11" -content-hash = "dae71b8059eee9e2ebfc35a35f829dec5abef322fe110677f06f548c15879b23" +content-hash = "633de8bf1e048035b3b9a69c9e1719420a312b53071caf38f73798116ab63a81" [metadata.files] aerich = [ @@ -962,12 +939,12 @@ aiosqlite = [ {file = "aiosqlite-0.17.0.tar.gz", hash = "sha256:f0e6acc24bc4864149267ac82fb46dfb3be4455f99fe21df82609cc6e6baee51"}, ] apscheduler = [ - {file = "APScheduler-3.8.1-py2.py3-none-any.whl", hash = "sha256:c22cb14b411a31435eb2c530dfbbec948ac63015b517087c7978adb61b574865"}, - {file = "APScheduler-3.8.1.tar.gz", hash = "sha256:5cf344ebcfbdaa48ae178c029c055cec7bc7a4a47c21e315e4d1f08bd35f2355"}, + {file = "APScheduler-3.9.1-py2.py3-none-any.whl", hash = "sha256:ddc25a0ddd899de44d7f451f4375fb971887e65af51e41e5dcf681f59b8b2c9a"}, + {file = "APScheduler-3.9.1.tar.gz", hash = "sha256:65e6574b6395498d371d045f2a8a7e4f7d50c6ad21ef7313d15b1c7cf20df1e3"}, ] asgiref = [ - {file = "asgiref-3.4.1-py3-none-any.whl", hash = "sha256:ffc141aa908e6f175673e7b1b3b7af4fdb0ecb738fc5c8b88f69f055c2415214"}, - {file = "asgiref-3.4.1.tar.gz", hash = "sha256:4ef1ab46b484e3c706329cedeff284a5d40824200638503f5768edb6de7d58e9"}, + {file = "asgiref-3.5.0-py3-none-any.whl", hash = "sha256:88d59c13d634dcffe0510be048210188edd79aeccb6a6c9028cdad6f31d730a9"}, + {file = "asgiref-3.5.0.tar.gz", hash = "sha256:2f8abc20f7248433085eda803936d98992f1343ddb022065779f37c5da0181d0"}, ] async-generator = [ {file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"}, @@ -1021,12 +998,12 @@ cfgv = [ {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, ] charset-normalizer = [ - {file = "charset-normalizer-2.0.10.tar.gz", hash = "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd"}, - {file = "charset_normalizer-2.0.10-py3-none-any.whl", hash = "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455"}, + {file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"}, + {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, ] click = [ - {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, - {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, + {file = "click-8.0.4-py3-none-any.whl", hash = "sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1"}, + {file = "click-8.0.4.tar.gz", hash = "sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, @@ -1049,97 +1026,90 @@ distlib = [ {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, ] filelock = [ - {file = "filelock-3.4.2-py3-none-any.whl", hash = "sha256:cf0fc6a2f8d26bd900f19bf33915ca70ba4dd8c56903eeb14e1e7a2fd7590146"}, - {file = "filelock-3.4.2.tar.gz", hash = "sha256:38b4f4c989f9d06d44524df1b24bd19e167d851f19b50bf3e3559952dddc5b80"}, + {file = "filelock-3.6.0-py3-none-any.whl", hash = "sha256:f8314284bfffbdcfa0ff3d7992b023d4c628ced6feb957351d4c48d059f56bc0"}, + {file = "filelock-3.6.0.tar.gz", hash = "sha256:9cd540a9352e432c7246a48fe4e8712b10acb1df2ad1f30e8c070b82ae1fed85"}, ] flake8 = [ {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, ] frozenlist = [ - {file = "frozenlist-1.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:977a1438d0e0d96573fd679d291a1542097ea9f4918a8b6494b06610dfeefbf9"}, - {file = "frozenlist-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a8d86547a5e98d9edd47c432f7a14b0c5592624b496ae9880fb6332f34af1edc"}, - {file = "frozenlist-1.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:181754275d5d32487431a0a29add4f897968b7157204bc1eaaf0a0ce80c5ba7d"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5df31bb2b974f379d230a25943d9bf0d3bc666b4b0807394b131a28fca2b0e5f"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4766632cd8a68e4f10f156a12c9acd7b1609941525569dd3636d859d79279ed3"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16eef427c51cb1203a7c0ab59d1b8abccaba9a4f58c4bfca6ed278fc896dc193"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:01d79515ed5aa3d699b05f6bdcf1fe9087d61d6b53882aa599a10853f0479c6c"}, - {file = "frozenlist-1.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:28e164722ea0df0cf6d48c4d5bdf3d19e87aaa6dfb39b0ba91153f224b912020"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e63ad0beef6ece06475d29f47d1f2f29727805376e09850ebf64f90777962792"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:41de4db9b9501679cf7cddc16d07ac0f10ef7eb58c525a1c8cbff43022bddca4"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c6a9d84ee6427b65a81fc24e6ef589cb794009f5ca4150151251c062773e7ed2"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:f5f3b2942c3b8b9bfe76b408bbaba3d3bb305ee3693e8b1d631fe0a0d4f93673"}, - {file = "frozenlist-1.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c98d3c04701773ad60d9545cd96df94d955329efc7743fdb96422c4b669c633b"}, - {file = "frozenlist-1.2.0-cp310-cp310-win32.whl", hash = "sha256:72cfbeab7a920ea9e74b19aa0afe3b4ad9c89471e3badc985d08756efa9b813b"}, - {file = "frozenlist-1.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:11ff401951b5ac8c0701a804f503d72c048173208490c54ebb8d7bb7c07a6d00"}, - {file = "frozenlist-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b46f997d5ed6d222a863b02cdc9c299101ee27974d9bbb2fd1b3c8441311c408"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:351686ca020d1bcd238596b1fa5c8efcbc21bffda9d0efe237aaa60348421e2a"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfbaa08cf1452acad9cb1c1d7b89394a41e712f88df522cea1a0f296b57782a0"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2ae2f5e9fa10805fb1c9adbfefaaecedd9e31849434be462c3960a0139ed729"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6790b8d96bbb74b7a6f4594b6f131bd23056c25f2aa5d816bd177d95245a30e3"}, - {file = "frozenlist-1.2.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:41f62468af1bd4e4b42b5508a3fe8cc46a693f0cdd0ca2f443f51f207893d837"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:ec6cf345771cdb00791d271af9a0a6fbfc2b6dd44cb753f1eeaa256e21622adb"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:14a5cef795ae3e28fb504b73e797c1800e9249f950e1c964bb6bdc8d77871161"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:8b54cdd2fda15467b9b0bfa78cee2ddf6dbb4585ef23a16e14926f4b076dfae4"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:f025f1d6825725b09c0038775acab9ae94264453a696cc797ce20c0769a7b367"}, - {file = "frozenlist-1.2.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:84e97f59211b5b9083a2e7a45abf91cfb441369e8bb6d1f5287382c1c526def3"}, - {file = "frozenlist-1.2.0-cp36-cp36m-win32.whl", hash = "sha256:c5328ed53fdb0a73c8a50105306a3bc013e5ca36cca714ec4f7bd31d38d8a97f"}, - {file = "frozenlist-1.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:9ade70aea559ca98f4b1b1e5650c45678052e76a8ab2f76d90f2ac64180215a2"}, - {file = "frozenlist-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a0d3ffa8772464441b52489b985d46001e2853a3b082c655ec5fad9fb6a3d618"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3457f8cf86deb6ce1ba67e120f1b0128fcba1332a180722756597253c465fc1d"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5a72eecf37eface331636951249d878750db84034927c997d47f7f78a573b72b"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:acc4614e8d1feb9f46dd829a8e771b8f5c4b1051365d02efb27a3229048ade8a"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:87521e32e18a2223311afc2492ef2d99946337da0779ddcda77b82ee7319df59"}, - {file = "frozenlist-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8b4c7665a17c3a5430edb663e4ad4e1ad457614d1b2f2b7f87052e2ef4fa45ca"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ed58803563a8c87cf4c0771366cf0ad1aa265b6b0ae54cbbb53013480c7ad74d"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:aa44c4740b4e23fcfa259e9dd52315d2b1770064cde9507457e4c4a65a04c397"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:2de5b931701257d50771a032bba4e448ff958076380b049fd36ed8738fdb375b"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:6e105013fa84623c057a4381dc8ea0361f4d682c11f3816cc80f49a1f3bc17c6"}, - {file = "frozenlist-1.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:705c184b77565955a99dc360f359e8249580c6b7eaa4dc0227caa861ef46b27a"}, - {file = "frozenlist-1.2.0-cp37-cp37m-win32.whl", hash = "sha256:a37594ad6356e50073fe4f60aa4187b97d15329f2138124d252a5a19c8553ea4"}, - {file = "frozenlist-1.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:25b358aaa7dba5891b05968dd539f5856d69f522b6de0bf34e61f133e077c1a4"}, - {file = "frozenlist-1.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af2a51c8a381d76eabb76f228f565ed4c3701441ecec101dd18be70ebd483cfd"}, - {file = "frozenlist-1.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:82d22f6e6f2916e837c91c860140ef9947e31194c82aaeda843d6551cec92f19"}, - {file = "frozenlist-1.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1cfe6fef507f8bac40f009c85c7eddfed88c1c0d38c75e72fe10476cef94e10f"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26f602e380a5132880fa245c92030abb0fc6ff34e0c5500600366cedc6adb06a"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4ad065b2ebd09f32511ff2be35c5dfafee6192978b5a1e9d279a5c6e121e3b03"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bc93f5f62df3bdc1f677066327fc81f92b83644852a31c6aa9b32c2dde86ea7d"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:89fdfc84c6bf0bff2ff3170bb34ecba8a6911b260d318d377171429c4be18c73"}, - {file = "frozenlist-1.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:47b2848e464883d0bbdcd9493c67443e5e695a84694efff0476f9059b4cb6257"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4f52d0732e56906f8ddea4bd856192984650282424049c956857fed43697ea43"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:16ef7dd5b7d17495404a2e7a49bac1bc13d6d20c16d11f4133c757dd94c4144c"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:1cf63243bc5f5c19762943b0aa9e0d3fb3723d0c514d820a18a9b9a5ef864315"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:54a1e09ab7a69f843cd28fefd2bcaf23edb9e3a8d7680032c8968b8ac934587d"}, - {file = "frozenlist-1.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:954b154a4533ef28bd3e83ffdf4eadf39deeda9e38fb8feaf066d6069885e034"}, - {file = "frozenlist-1.2.0-cp38-cp38-win32.whl", hash = "sha256:cb3957c39668d10e2b486acc85f94153520a23263b6401e8f59422ef65b9520d"}, - {file = "frozenlist-1.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:0a7c7cce70e41bc13d7d50f0e5dd175f14a4f1837a8549b0936ed0cbe6170bf9"}, - {file = "frozenlist-1.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:4c457220468d734e3077580a3642b7f682f5fd9507f17ddf1029452450912cdc"}, - {file = "frozenlist-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e74f8b4d8677ebb4015ac01fcaf05f34e8a1f22775db1f304f497f2f88fdc697"}, - {file = "frozenlist-1.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fbd4844ff111449f3bbe20ba24fbb906b5b1c2384d0f3287c9f7da2354ce6d23"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0081a623c886197ff8de9e635528fd7e6a387dccef432149e25c13946cb0cd0"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9b6e21e5770df2dea06cb7b6323fbc008b13c4a4e3b52cb54685276479ee7676"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:406aeb340613b4b559db78d86864485f68919b7141dec82aba24d1477fd2976f"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:878ebe074839d649a1cdb03a61077d05760624f36d196884a5cafb12290e187b"}, - {file = "frozenlist-1.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1fef737fd1388f9b93bba8808c5f63058113c10f4e3c0763ced68431773f72f9"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4a495c3d513573b0b3f935bfa887a85d9ae09f0627cf47cad17d0cc9b9ba5c38"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:e7d0dd3e727c70c2680f5f09a0775525229809f1a35d8552b92ff10b2b14f2c2"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:66a518731a21a55b7d3e087b430f1956a36793acc15912e2878431c7aec54210"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:94728f97ddf603d23c8c3dd5cae2644fa12d33116e69f49b1644a71bb77b89ae"}, - {file = "frozenlist-1.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c1e8e9033d34c2c9e186e58279879d78c94dd365068a3607af33f2bc99357a53"}, - {file = "frozenlist-1.2.0-cp39-cp39-win32.whl", hash = "sha256:83334e84a290a158c0c4cc4d22e8c7cfe0bba5b76d37f1c2509dabd22acafe15"}, - {file = "frozenlist-1.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:735f386ec522e384f511614c01d2ef9cf799f051353876b4c6fb93ef67a6d1ee"}, - {file = "frozenlist-1.2.0.tar.gz", hash = "sha256:68201be60ac56aff972dc18085800b6ee07973c49103a8aba669dee3d71079de"}, -] -hikari = [] -hikari-lightbulb = [] + {file = "frozenlist-1.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d2257aaba9660f78c7b1d8fea963b68f3feffb1a9d5d05a18401ca9eb3e8d0a3"}, + {file = "frozenlist-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4a44ebbf601d7bac77976d429e9bdb5a4614f9f4027777f9e54fd765196e9d3b"}, + {file = "frozenlist-1.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:45334234ec30fc4ea677f43171b18a27505bfb2dba9aca4398a62692c0ea8868"}, + {file = "frozenlist-1.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47be22dc27ed933d55ee55845d34a3e4e9f6fee93039e7f8ebadb0c2f60d403f"}, + {file = "frozenlist-1.3.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:03a7dd1bfce30216a3f51a84e6dd0e4a573d23ca50f0346634916ff105ba6e6b"}, + {file = "frozenlist-1.3.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:691ddf6dc50480ce49f68441f1d16a4c3325887453837036e0fb94736eae1e58"}, + {file = "frozenlist-1.3.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bde99812f237f79eaf3f04ebffd74f6718bbd216101b35ac7955c2d47c17da02"}, + {file = "frozenlist-1.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6a202458d1298ced3768f5a7d44301e7c86defac162ace0ab7434c2e961166e8"}, + {file = "frozenlist-1.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b9e3e9e365991f8cc5f5edc1fd65b58b41d0514a6a7ad95ef5c7f34eb49b3d3e"}, + {file = "frozenlist-1.3.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:04cb491c4b1c051734d41ea2552fde292f5f3a9c911363f74f39c23659c4af78"}, + {file = "frozenlist-1.3.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:436496321dad302b8b27ca955364a439ed1f0999311c393dccb243e451ff66aa"}, + {file = "frozenlist-1.3.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:754728d65f1acc61e0f4df784456106e35afb7bf39cfe37227ab00436fb38676"}, + {file = "frozenlist-1.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6eb275c6385dd72594758cbe96c07cdb9bd6becf84235f4a594bdf21e3596c9d"}, + {file = "frozenlist-1.3.0-cp310-cp310-win32.whl", hash = "sha256:e30b2f9683812eb30cf3f0a8e9f79f8d590a7999f731cf39f9105a7c4a39489d"}, + {file = "frozenlist-1.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f7353ba3367473d1d616ee727945f439e027f0bb16ac1a750219a8344d1d5d3c"}, + {file = "frozenlist-1.3.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:88aafd445a233dbbf8a65a62bc3249a0acd0d81ab18f6feb461cc5a938610d24"}, + {file = "frozenlist-1.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4406cfabef8f07b3b3af0f50f70938ec06d9f0fc26cbdeaab431cbc3ca3caeaa"}, + {file = "frozenlist-1.3.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8cf829bd2e2956066dd4de43fd8ec881d87842a06708c035b37ef632930505a2"}, + {file = "frozenlist-1.3.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:603b9091bd70fae7be28bdb8aa5c9990f4241aa33abb673390a7f7329296695f"}, + {file = "frozenlist-1.3.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:25af28b560e0c76fa41f550eacb389905633e7ac02d6eb3c09017fa1c8cdfde1"}, + {file = "frozenlist-1.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94c7a8a9fc9383b52c410a2ec952521906d355d18fccc927fca52ab575ee8b93"}, + {file = "frozenlist-1.3.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:65bc6e2fece04e2145ab6e3c47428d1bbc05aede61ae365b2c1bddd94906e478"}, + {file = "frozenlist-1.3.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3f7c935c7b58b0d78c0beea0c7358e165f95f1fd8a7e98baa40d22a05b4a8141"}, + {file = "frozenlist-1.3.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd89acd1b8bb4f31b47072615d72e7f53a948d302b7c1d1455e42622de180eae"}, + {file = "frozenlist-1.3.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:6983a31698490825171be44ffbafeaa930ddf590d3f051e397143a5045513b01"}, + {file = "frozenlist-1.3.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:adac9700675cf99e3615eb6a0eb5e9f5a4143c7d42c05cea2e7f71c27a3d0846"}, + {file = "frozenlist-1.3.0-cp37-cp37m-win32.whl", hash = "sha256:0c36e78b9509e97042ef869c0e1e6ef6429e55817c12d78245eb915e1cca7468"}, + {file = "frozenlist-1.3.0-cp37-cp37m-win_amd64.whl", hash = "sha256:57f4d3f03a18facacb2a6bcd21bccd011e3b75d463dc49f838fd699d074fabd1"}, + {file = "frozenlist-1.3.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:8c905a5186d77111f02144fab5b849ab524f1e876a1e75205cd1386a9be4b00a"}, + {file = "frozenlist-1.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b5009062d78a8c6890d50b4e53b0ddda31841b3935c1937e2ed8c1bda1c7fb9d"}, + {file = "frozenlist-1.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2fdc3cd845e5a1f71a0c3518528bfdbfe2efaf9886d6f49eacc5ee4fd9a10953"}, + {file = "frozenlist-1.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:92e650bd09b5dda929523b9f8e7f99b24deac61240ecc1a32aeba487afcd970f"}, + {file = "frozenlist-1.3.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:40dff8962b8eba91fd3848d857203f0bd704b5f1fa2b3fc9af64901a190bba08"}, + {file = "frozenlist-1.3.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:768efd082074bb203c934e83a61654ed4931ef02412c2fbdecea0cff7ecd0274"}, + {file = "frozenlist-1.3.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:006d3595e7d4108a12025ddf415ae0f6c9e736e726a5db0183326fd191b14c5e"}, + {file = "frozenlist-1.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:871d42623ae15eb0b0e9df65baeee6976b2e161d0ba93155411d58ff27483ad8"}, + {file = "frozenlist-1.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aff388be97ef2677ae185e72dc500d19ecaf31b698986800d3fc4f399a5e30a5"}, + {file = "frozenlist-1.3.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:9f892d6a94ec5c7b785e548e42722e6f3a52f5f32a8461e82ac3e67a3bd073f1"}, + {file = "frozenlist-1.3.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:e982878792c971cbd60ee510c4ee5bf089a8246226dea1f2138aa0bb67aff148"}, + {file = "frozenlist-1.3.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:c6c321dd013e8fc20735b92cb4892c115f5cdb82c817b1e5b07f6b95d952b2f0"}, + {file = "frozenlist-1.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:30530930410855c451bea83f7b272fb1c495ed9d5cc72895ac29e91279401db3"}, + {file = "frozenlist-1.3.0-cp38-cp38-win32.whl", hash = "sha256:40ec383bc194accba825fbb7d0ef3dda5736ceab2375462f1d8672d9f6b68d07"}, + {file = "frozenlist-1.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:f20baa05eaa2bcd5404c445ec51aed1c268d62600362dc6cfe04fae34a424bd9"}, + {file = "frozenlist-1.3.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0437fe763fb5d4adad1756050cbf855bbb2bf0d9385c7bb13d7a10b0dd550486"}, + {file = "frozenlist-1.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b684c68077b84522b5c7eafc1dc735bfa5b341fb011d5552ebe0968e22ed641c"}, + {file = "frozenlist-1.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93641a51f89473837333b2f8100f3f89795295b858cd4c7d4a1f18e299dc0a4f"}, + {file = "frozenlist-1.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d6d32ff213aef0fd0bcf803bffe15cfa2d4fde237d1d4838e62aec242a8362fa"}, + {file = "frozenlist-1.3.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31977f84828b5bb856ca1eb07bf7e3a34f33a5cddce981d880240ba06639b94d"}, + {file = "frozenlist-1.3.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3c62964192a1c0c30b49f403495911298810bada64e4f03249ca35a33ca0417a"}, + {file = "frozenlist-1.3.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4eda49bea3602812518765810af732229b4291d2695ed24a0a20e098c45a707b"}, + {file = "frozenlist-1.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acb267b09a509c1df5a4ca04140da96016f40d2ed183cdc356d237286c971b51"}, + {file = "frozenlist-1.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e1e26ac0a253a2907d654a37e390904426d5ae5483150ce3adedb35c8c06614a"}, + {file = "frozenlist-1.3.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f96293d6f982c58ebebb428c50163d010c2f05de0cde99fd681bfdc18d4b2dc2"}, + {file = "frozenlist-1.3.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e84cb61b0ac40a0c3e0e8b79c575161c5300d1d89e13c0e02f76193982f066ed"}, + {file = "frozenlist-1.3.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:ff9310f05b9d9c5c4dd472983dc956901ee6cb2c3ec1ab116ecdde25f3ce4951"}, + {file = "frozenlist-1.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d26b650b71fdc88065b7a21f8ace70175bcf3b5bdba5ea22df4bfd893e795a3b"}, + {file = "frozenlist-1.3.0-cp39-cp39-win32.whl", hash = "sha256:01a73627448b1f2145bddb6e6c2259988bb8aee0fb361776ff8604b99616cd08"}, + {file = "frozenlist-1.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:772965f773757a6026dea111a15e6e2678fbd6216180f82a48a40b27de1ee2ab"}, + {file = "frozenlist-1.3.0.tar.gz", hash = "sha256:ce6f2ba0edb7b0c1d8976565298ad2deba6f8064d2bebb6ffce2ca896eb35b0b"}, +] +hikari = [ + {file = "hikari-2.0.0.dev107-py3-none-any.whl", hash = "sha256:1df67e6ab75fe804d24aa095377b47e6722b6d366dd9f62a6ba6b59d02e18ffc"}, + {file = "hikari-2.0.0.dev107.tar.gz", hash = "sha256:dc5676be8b010c64afed1313c6ace2077ccb2bd559ee3b8def1fd97bf551f4dd"}, +] +hikari-lightbulb = [ + {file = "hikari-lightbulb-2.2.0.tar.gz", hash = "sha256:0538a503fd415c88aab6dfbcb0463f1e22c35ed6bcaaa3f58ecbbfafa5e02a1d"}, + {file = "hikari_lightbulb-2.2.0-py3-none-any.whl", hash = "sha256:38b272006155a8ae8605b813225a3a5f033da509f9a5329e2d5521acdd414e22"}, +] hikari-miru = [ {file = "hikari-miru-0.6.3.tar.gz", hash = "sha256:56a0521ab0cdb9b4bc645c6b7d63129e9d6ccdd3e3ea5a3b9b79ae77958e691d"}, {file = "hikari_miru-0.6.3-py3-none-any.whl", hash = "sha256:8e8917aefcaee625a4b645cc3a3a8633b4d2c8d98716e1405189e5f1d9efdd17"}, ] hikari-yuyo = [] identify = [ - {file = "identify-2.4.4-py2.py3-none-any.whl", hash = "sha256:aa68609c7454dbcaae60a01ff6b8df1de9b39fe6e50b1f6107ec81dcda624aa6"}, - {file = "identify-2.4.4.tar.gz", hash = "sha256:6b4b5031f69c48bf93a646b90de9b381c6b5f560df4cbe0ed3cf7650ae741e4d"}, + {file = "identify-2.4.11-py2.py3-none-any.whl", hash = "sha256:fd906823ed1db23c7a48f9b176a1d71cb8abede1e21ebe614bac7bdd688d9213"}, + {file = "identify-2.4.11.tar.gz", hash = "sha256:2986942d3974c8f2e5019a190523b0b0e2a07cb8e89bf236727fb4b26f27f8fd"}, ] idna = [ {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, @@ -1153,8 +1123,41 @@ isort = [ {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] -lavasnek_rs = [ - {file = "lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl", hash = "sha256:461fee8c75dc35d7a1b3f0e2bb6783a36e8838b7a6f4c675fc424b10d952396b"}, +lavasnek-rs = [ + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e90ec88f94d13407aa0af09e82daca16344ae03204f6d31b583aded9b36bd71d"}, + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7ae586fe7c583e209a2310f19b1a841d6ebb12d03405978545333520057cfdc2"}, + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9c10b99d51740522154af0868cdfadb010d4bd07048cb3beb4a8f49afc52834"}, + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f7dbe15e0b391850b06b12115870c4377b270ff11e36f54e3e10a1e15008541"}, + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:57d864df136ee828499b4efcc1ad980e37133cba48acc23278713646277488c2"}, + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:21f7c4dfbb08123257e490fb5ac48cfe622d4c3273dcf4edc551e504903a12ce"}, + {file = "lavasnek_rs-0.1.0a4-cp310-cp310-win_amd64.whl", hash = "sha256:28c0ea0b9c04993b8cc6cce421e11667050c2b024aa5493204727c31e7d82b35"}, + {file = "lavasnek_rs-0.1.0a4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e1de22f9e10ba6a46f9371242b9f2edbf50fb6ef554cd04dd687d8c92bdd159d"}, + {file = "lavasnek_rs-0.1.0a4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18f646f2c5004b93e22e143c6aa498c549a22836114a4f501ae2370818a68912"}, + {file = "lavasnek_rs-0.1.0a4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b0db001af8f6eb10cdaf530674b15c5f90d48972111449c2087f3643b3088a02"}, + {file = "lavasnek_rs-0.1.0a4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:d9d896643873052c0e749908caaf6b104b7fba969698f88ddda1a2c7bf98ce05"}, + {file = "lavasnek_rs-0.1.0a4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:7a5e3a77b037c1bed7d13913b083d4c19ed769d44c50ec3e40a68c30e8b69f8e"}, + {file = "lavasnek_rs-0.1.0a4-cp36-cp36m-win_amd64.whl", hash = "sha256:3e32758fad1abaae75cc20e18c696ff8786e14c5ddff8a801d526e037a53d3e0"}, + {file = "lavasnek_rs-0.1.0a4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4150425dd6112100460aa975b9d753fd905f49d906dc72b23c003d73f7d5ac29"}, + {file = "lavasnek_rs-0.1.0a4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8c07c18223a0ad6d3351230d9874d2496371fb2efbd02737edf5e926a589e23"}, + {file = "lavasnek_rs-0.1.0a4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54d4c30e0e0ead8317fe91bb47029ceb3ea4106d8a24e1cbad66105b35fc017b"}, + {file = "lavasnek_rs-0.1.0a4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6f041c47081427cc759103e000ac01c7673cee672dd551a3800eeb4a6d74f2fe"}, + {file = "lavasnek_rs-0.1.0a4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ca685c21982fc16d84377c413df8ce8ba95d5f163c5f57b4a30eb5598a9070ab"}, + {file = "lavasnek_rs-0.1.0a4-cp37-cp37m-win_amd64.whl", hash = "sha256:e38edc01c40d93d9e04d6857a014b2403b2476d7714e5201cd1d83affe8ed34d"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1aa4d5f1a00d6d902b0454652966b4073c791a6e1ed413b7f214f996520255f3"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1866141068309ed2fa6d0bbe7294b90f4beb155b4428bb5876fac02988706722"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7e3dddcb021d11154219c56591311bd2d359f4ef8405531cc2a25b06a9a841d7"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc3ef51410c87264ec583baeb14361b2495b6ec88b195caa8534b9cb757edea"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a66921e131e56b35dde5ff8a5f5fe611471e0894ad104e6653fe31910862ba2e"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5a86c8445ca60dd7ad717a54801f46b5da585131ff8f895d285e13c049b0f050"}, + {file = "lavasnek_rs-0.1.0a4-cp38-cp38-win_amd64.whl", hash = "sha256:78e55bab850d1620daa3e6353cb23333cdad910d252f903ce7d1f1889c9b31db"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6414f650cca5945b671cd899b7f85189d99a3d8040c707e68de2a8aec7003d31"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:811b67476b6c7a1fef734feafef5ec692ce218e60a63911a3220a25d33f10633"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f2ae07832b6b1577e8ad6988ec9d9e8e0f422a5a0d366b33bd263a78d64f24d"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:03dea77b695b02b4e7e8903b1ea85e1ee961f621a06e6375fbdc20cb3e2c4fd5"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:681c89d63ee39df83f1bc49303c11659503303977d22b75e6b5faeafc4776567"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9e8ec46972de5e8bce22db471d9a8251d9a2e4829163a457f3744c85ca87697e"}, + {file = "lavasnek_rs-0.1.0a4-cp39-cp39-win_amd64.whl", hash = "sha256:13b9db7271b01f0007f111bad52675f47d4c86f5eeb8c2327fc8e890c44941c7"}, + {file = "lavasnek_rs-0.1.0a4.tar.gz", hash = "sha256:2612c90dd3c380d440a9000c48b185d87334185e9f4f66b57e7d44838e261974"}, ] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, @@ -1234,15 +1237,12 @@ pathspec = [ {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, ] platformdirs = [ - {file = "platformdirs-2.4.1-py3-none-any.whl", hash = "sha256:1d7385c7db91728b83efd0ca99a5afb296cab9d0ed8313a45ed8ba17967ecfca"}, - {file = "platformdirs-2.4.1.tar.gz", hash = "sha256:440633ddfebcc36264232365d7840a970e75e1018d15b4327d11f91909045fda"}, + {file = "platformdirs-2.5.1-py3-none-any.whl", hash = "sha256:bcae7cab893c2d310a711b70b24efb93334febe65f8de776ee320b517471e227"}, + {file = "platformdirs-2.5.1.tar.gz", hash = "sha256:7535e70dfa32e84d4b34996ea99c5e432fa29a708d0f4e394bbcb2a8faa4f16d"}, ] pre-commit = [ - {file = "pre_commit-2.16.0-py2.py3-none-any.whl", hash = "sha256:758d1dc9b62c2ed8881585c254976d66eae0889919ab9b859064fc2fe3c7743e"}, - {file = "pre_commit-2.16.0.tar.gz", hash = "sha256:fe9897cac830aa7164dbd02a4e7b90cae49630451ce88464bca73db486ba9f65"}, -] -pure25519 = [ - {file = "pure25519-0.0.1.tar.gz", hash = "sha256:8982b990294efc7bef12d8e89e3e3d0a8249ef7e21adf567660941fce255033d"}, + {file = "pre_commit-2.17.0-py2.py3-none-any.whl", hash = "sha256:725fa7459782d7bec5ead072810e47351de01709be838c2ce1726b9591dad616"}, + {file = "pre_commit-2.17.0.tar.gz", hash = "sha256:c1a8040ff15ad3d648c70cc3e55b93e4d2d5b687320955505587fd79bbaed06a"}, ] pycodestyle = [ {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, @@ -1290,8 +1290,8 @@ pyflakes = [ {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, ] pyparsing = [ - {file = "pyparsing-3.0.6-py3-none-any.whl", hash = "sha256:04ff808a5b90911829c55c4e26f75fa5ca8a2f5f36aa3a51f68e27033341d3e4"}, - {file = "pyparsing-3.0.6.tar.gz", hash = "sha256:d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81"}, + {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, + {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, ] pypika-tortoise = [ {file = "pypika-tortoise-0.1.3.tar.gz", hash = "sha256:ecdf2d6e0aeb0e15880d9e2ead41362ec7320f37fb25a3a71664c2e1105ad218"}, @@ -1423,8 +1423,8 @@ tortoise-orm = [ {file = "tortoise_orm-0.17.8-py3-none-any.whl", hash = "sha256:f18c41bb83be4748a6ca259ed7309ca954b35f5790971824bbc79a11d2b1ef3b"}, ] typing-extensions = [ - {file = "typing_extensions-4.0.1-py3-none-any.whl", hash = "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"}, - {file = "typing_extensions-4.0.1.tar.gz", hash = "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e"}, + {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, + {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, ] tzdata = [ {file = "tzdata-2021.5-py2.py3-none-any.whl", hash = "sha256:3eee491e22ebfe1e5cfcc97a4137cd70f092ce59144d81f8924a844de05ba8f5"}, @@ -1461,8 +1461,8 @@ uvloop = [ {file = "uvloop-0.16.0.tar.gz", hash = "sha256:f74bc20c7b67d1c27c72601c78cf95be99d5c2cdd4514502b4f3eb0933ff1228"}, ] virtualenv = [ - {file = "virtualenv-20.13.0-py2.py3-none-any.whl", hash = "sha256:339f16c4a86b44240ba7223d0f93a7887c3ca04b5f9c8129da7958447d079b09"}, - {file = "virtualenv-20.13.0.tar.gz", hash = "sha256:d8458cf8d59d0ea495ad9b34c2599487f8a7772d796f9910858376d1600dd2dd"}, + {file = "virtualenv-20.13.3-py2.py3-none-any.whl", hash = "sha256:dd448d1ded9f14d1a4bfa6bfc0c5b96ae3be3f2d6c6c159b23ddcfd701baa021"}, + {file = "virtualenv-20.13.3.tar.gz", hash = "sha256:e9dd1a1359d70137559034c0f5433b34caf504af2dc756367be86a5a32967134"}, ] yarl = [ {file = "yarl-1.7.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2a8508f7350512434e41065684076f640ecce176d262a7d54f0da41d99c5a95"}, diff --git a/pyproject.toml b/pyproject.toml old mode 100644 new mode 100755 index c80f790..bff0337 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ python = ">=3.10,<3.11" pydantic = "^1.8.2" aerich = "0.5.3" asyncpg = "^0.24.0" -hikari-lightbulb = {git = "https://github.com/tandemdude/hikari-lightbulb", rev = "0e27fce"} +hikari-lightbulb = "^2.1.3" python-dotenv = "^0.19.2" tortoise-orm = "^0.17.8" aioredis = "^2.0.0" @@ -22,11 +22,11 @@ APScheduler = "^3.8.1" uvloop = "^0.16.0" aiofiles = "0.6.0" asyncpraw = "^7.5.0" -lavasnek_rs={ file = "wheels/lavasnek_rs-0.1.0_alpha.3-cp310-cp310-manylinux_2_24_x86_64.whl" } rapidfuzz = "^1.9.1" hikari-miru = "^0.6.3" -hikari = {git = "https://github.com/hikari-py/hikari", rev = "38e9874"} +hikari = "^2.0.0-alpha.105" reddist = "^0.1.2" +lavasnek-rs="^0.1.0-alpha.4" [tool.poetry.dev-dependencies] black = "^21.11b0"