misc: renamed say cog to send cog
This commit is contained in:
parent
35f06f705b
commit
0a7c25ce7c
5 changed files with 19 additions and 20 deletions
|
@ -1,5 +0,0 @@
|
||||||
from .say import Say
|
|
||||||
|
|
||||||
|
|
||||||
async def setup(bot):
|
|
||||||
await bot.add_cog(Say(bot))
|
|
|
@ -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
5
send/__init__.py
Normal 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
8
send/info.json
Normal 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."
|
||||||
|
}
|
|
@ -2,7 +2,7 @@ from typing import Union
|
||||||
import discord
|
import discord
|
||||||
from redbot.core import commands, checks, app_commands
|
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."""
|
"""Allows you to send messages as the bot account."""
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
|
@ -45,7 +45,7 @@ class Say(commands.Cog):
|
||||||
)
|
)
|
||||||
|
|
||||||
async def on_submit(self, interaction: discord.Interaction):
|
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!")
|
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):
|
async def user(self, interaction: discord.Interaction, member: discord.Member, message: str = None):
|
||||||
"""Sends a direct message to a user."""
|
"""Sends a direct message to a user."""
|
||||||
if message:
|
if message:
|
||||||
await Say.send_to_target(self, member, interaction, message)
|
await Send.send_to_target(self, member, interaction, message)
|
||||||
else:
|
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.")
|
@send.command(name="channel", description="Sends a message to a channel.")
|
||||||
async def channel(self, interaction: discord.Interaction, channel: discord.TextChannel, message: str = None):
|
async def channel(self, interaction: discord.Interaction, channel: discord.TextChannel, message: str = None):
|
||||||
"""Sends a message to a channel."""
|
"""Sends a message to a channel."""
|
||||||
if message:
|
if message:
|
||||||
await Say.send_to_target(self, channel, interaction, message)
|
await Send.send_to_target(self, channel, interaction, message)
|
||||||
else:
|
else:
|
||||||
await interaction.response.send_modal(Say.MessageModal(channel))
|
await interaction.response.send_modal(Send.MessageModal(channel))
|
Loading…
Reference in a new issue