make send take a string
This commit is contained in:
parent
aa7243e0d6
commit
3eb7d2d21a
@ -99,7 +99,7 @@ class ServerUtils(commands.Cog):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
@commands.command(name="send")
|
@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:
|
if ctx.message.author.id != core_utils.my_id:
|
||||||
return
|
return
|
||||||
select = Select(
|
select = Select(
|
||||||
@ -117,10 +117,11 @@ class ServerUtils(commands.Cog):
|
|||||||
async def my_callback(interaction):
|
async def my_callback(interaction):
|
||||||
for guild in self.bot.guilds:
|
for guild in self.bot.guilds:
|
||||||
if guild.name == select.values[0]:
|
if guild.name == select.values[0]:
|
||||||
|
print("Found %s" % guild)
|
||||||
channel = discord.utils.get(ctx.guild.channels, name="general")
|
channel = discord.utils.get(ctx.guild.channels, name="general")
|
||||||
channel_id = channel.id
|
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
|
select.callback = my_callback
|
||||||
view = View()
|
view = View()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user