misc: renamed say cog to send cog

This commit is contained in:
Seaswimmer 2023-08-07 21:38:35 -04:00
parent 35f06f705b
commit 0a7c25ce7c
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8
5 changed files with 19 additions and 20 deletions

View file

@ -1,5 +0,0 @@
from .say import Say
async def setup(bot):
await bot.add_cog(Say(bot))

View file

@ -1,9 +0,0 @@
{
"author" : ["SeaswimmerTheFsh"],
"install_msg" : "Thank you for installing Info!\nYou can find the source code of this cog here: https://github.com/SeaswimmerTheFsh/GalaxyCogs",
"name" : "Info",
"short" : "Provides information on Discord objects.",
"description" : "Provides information on Discord objects. Most of this code is shamelessly ripped from <https://github.com/Cog-Creators/Red-DiscordBot/tree/V3/develop/redbot/cogs>.",
"end_user_data_statement" : "This cog does not store any End User Data."
}

5
send/__init__.py Normal file
View file

@ -0,0 +1,5 @@
from .send import Send
async def setup(bot):
await bot.add_cog(Send(bot))

8
send/info.json Normal file
View file

@ -0,0 +1,8 @@
{
"author" : ["SeaswimmerTheFsh"],
"install_msg" : "Thank you for installing Send!\nYou can find the source code of this cog here: https://github.com/SeaswimmerTheFsh/GalaxyCogs",
"name" : "Send",
"short" : "Allows you to send messages as the bot user!",
"description" : "Allows you to send messages as the bot user!.",
"end_user_data_statement" : "This cog does not store any End User Data."
}

View file

@ -2,7 +2,7 @@ from typing import Union
import discord
from redbot.core import commands, checks, app_commands
class Say(commands.Cog):
class Send(commands.Cog):
"""Allows you to send messages as the bot account."""
def __init__(self, bot):
@ -45,7 +45,7 @@ class Say(commands.Cog):
)
async def on_submit(self, interaction: discord.Interaction):
await Say.send_to_target(self, self.target, interaction, self.message, self.secondary_message)
await Send.send_to_target(self, self.target, interaction, self.message, self.secondary_message)
send = app_commands.Group(name="send", description="Send a message as the bot user!")
@ -53,14 +53,14 @@ class Say(commands.Cog):
async def user(self, interaction: discord.Interaction, member: discord.Member, message: str = None):
"""Sends a direct message to a user."""
if message:
await Say.send_to_target(self, member, interaction, message)
await Send.send_to_target(self, member, interaction, message)
else:
await interaction.response.send_modal(Say.MessageModal(member))
await interaction.response.send_modal(Send.MessageModal(member))
@send.command(name="channel", description="Sends a message to a channel.")
async def channel(self, interaction: discord.Interaction, channel: discord.TextChannel, message: str = None):
"""Sends a message to a channel."""
if message:
await Say.send_to_target(self, channel, interaction, message)
await Send.send_to_target(self, channel, interaction, message)
else:
await interaction.response.send_modal(Say.MessageModal(channel))
await interaction.response.send_modal(Send.MessageModal(channel))