Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pycord to 2.5.0, also allowing python 3.12 to be used #64

Merged
merged 9 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cogs/blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
from discord import slash_command, option
from discord.ext import commands
from discord.ext.bridge import Bot

JoshuaSlui marked this conversation as resolved.
Show resolved Hide resolved
from utilities.database import modifier


class Blacklist(commands.Cog):
class Blacklist(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

@slash_command()
@commands.is_owner()
@option("server", discord.Guild, description="The server to blacklist")
ToothyDev marked this conversation as resolved.
Show resolved Hide resolved
@option("server", int, description="The server ID of the server to blacklist")
@option("reason", str, description="The reason for the blacklist")
async def blacklist(self, ctx, server, reason):
""" Blacklist a server from the bot """
Expand Down
6 changes: 4 additions & 2 deletions cogs/checkip.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from asyncio import wait_for

import discord
from discord import slash_command, option, Embed
from discord.ext import commands
from discord.ext.commands import Bot

from utilities.data import Colors, get_server_status
from utilities.utility import check_ip
JoshuaSlui marked this conversation as resolved.
Show resolved Hide resolved


class CheckIP(commands.Cog):
class CheckIP(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

Expand Down
8 changes: 5 additions & 3 deletions cogs/cogs.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from os import listdir
from discord.ext.commands import slash_command
from discord.ext import commands

import discord
from discord import Option
from discord.ext.bridge import Bot
from discord.ext.commands import slash_command

from utilities.data import get_data
JoshuaSlui marked this conversation as resolved.
Show resolved Hide resolved


class Cogs(commands.Cog):
class Cogs(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot
self.info = get_data()
Expand Down
2 changes: 1 addition & 1 deletion cogs/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from discord.ext.bridge import Bot


class Error(commands.Cog):
class Error(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

Expand Down
6 changes: 4 additions & 2 deletions cogs/info.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from asyncio import wait_for

import discord
from discord import slash_command, Embed
from discord.ext import commands
from discord.ext.commands import Bot

from utilities.data import Colors, get_server_status
JoshuaSlui marked this conversation as resolved.
Show resolved Hide resolved


class Info(commands.Cog):
class Info(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

Expand Down
8 changes: 5 additions & 3 deletions cogs/internallogs.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import aiohttp
from discord.ext import commands
import discord
from discord import Guild, Embed, Webhook
from discord.ext import commands
from discord.ext.bridge import Bot
from utilities.database import selector

from utilities.data import Colors, get_data
from utilities.database import selector


class InternalLogs(commands.Cog):
class InternalLogs(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

Expand Down
4 changes: 3 additions & 1 deletion cogs/setserver.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import discord
from discord import slash_command
from discord.ext import commands
from discord.ext.commands import Bot

from utilities.database import modifier
from utilities.utility import check_ip


class SetServer(commands.Cog):
class SetServer(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

Expand Down
6 changes: 4 additions & 2 deletions cogs/status.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
from asyncio import wait_for

import discord
from discord import slash_command, option, Embed, utils as dutils
from discord.ext import commands
from discord.ext.commands import Bot

from utilities.data import remove_colors_from_string, Colors, get_server_status
from utilities.database import selector
from utilities.utility import check_ip
JoshuaSlui marked this conversation as resolved.
Show resolved Hide resolved


class Status(commands.Cog):
class Status(discord.Cog):
def __init__(self, bot: Bot):
self.bot = bot

Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
py-cord[speed]==2.4.1
py-cord==2.5.0
python-dotenv==0.21.1
mcstatus==11.0.1
mysql-connector-python==8.0.32
mcstatus==11.1.1
mysql-connector-python==8.3.0
Loading