make send take a string

This commit is contained in:
Luke Robles 2022-10-19 08:10:15 -07:00
parent aa7243e0d6
commit 3eb7d2d21a

View File

@ -99,7 +99,7 @@ class ServerUtils(commands.Cog):
pass
@commands.command(name="send")
async def send(self, ctx, message):
async def send(self, ctx, *, message):
if ctx.message.author.id != core_utils.my_id:
return
select = Select(
@ -117,10 +117,11 @@ class ServerUtils(commands.Cog):
async def my_callback(interaction):
for guild in self.bot.guilds:
if guild.name == select.values[0]:
print("Found %s" % guild)
channel = discord.utils.get(ctx.guild.channels, name="general")
channel_id = channel.id
await self.bot.get_channel(int(channel_id)).send(message)
await self.bot.get_channel(channel_id).send(message)
select.callback = my_callback
view = View()