Replace rest of bot.config references. Clear record.py of old config usage.
This commit is contained in:
@@ -6,11 +6,9 @@ import nextcord
|
||||
from nextcord.ext import commands
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from DakinySettings import settings
|
||||
from database_setup.sql_data_classes import Presences, engine
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from DakinySettings import DakinySettings
|
||||
|
||||
|
||||
class RequestCog(commands.Cog, name="Request Commands"):
|
||||
"""Class holds request commands."""
|
||||
@@ -41,10 +39,9 @@ class RequestCog(commands.Cog, name="Request Commands"):
|
||||
interaction (nextcord.Interaction): Interaction that invoked the command.
|
||||
presence (str): The presence to add.
|
||||
"""
|
||||
config: DakinySettings = self.bot.config
|
||||
content = f'<@{interaction.user.id}> would like to add presence "{presence}."'
|
||||
view = PresenceChange(presence)
|
||||
await self.bot.get_channel(config.params.admin_channel_id).send(content=content, view=view)
|
||||
await self.bot.get_channel(settings.channel_ids.admin).send(content=content, view=view)
|
||||
await interaction.response.send_message("Request sent to admins.", ephemeral=True)
|
||||
|
||||
@request.subcommand(description="Request to change your Dakiny nickname")
|
||||
@@ -65,10 +62,9 @@ class RequestCog(commands.Cog, name="Request Commands"):
|
||||
interaction (nextcord.Interaction): Interaction that invoked the command.
|
||||
new_nickname(str): The username to change to.
|
||||
"""
|
||||
config: DakinySettings = self.bot.config
|
||||
content = f'<@{interaction.user.id}> would like to change their username to "{new_nickname}."'
|
||||
view = UsernameRequest(interaction.user.id, new_nickname)
|
||||
await self.bot.get_channel(config.params.admin_channel_id).send(content=content, view=view)
|
||||
await self.bot.get_channel(settings.channel_ids.admin).send(content=content, view=view)
|
||||
await interaction.response.send_message("Request sent to admins.", ephemeral=True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user