move topic command to be a slash command
This commit is contained in:
parent
8ceafa1f50
commit
7f50490ae0
@ -249,12 +249,14 @@ class ServerUtils(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
await ctx.reply(embed=help_methods.get_help_embed(self.bot))
|
await ctx.reply(embed=help_methods.get_help_embed(self.bot))
|
||||||
|
|
||||||
@commands.command(name="topic")
|
@commands.slash_command(
|
||||||
async def topic(self, ctx: commands.Context, *, new_channel_topic):
|
guild_ids=None, name="topic", description="Change the channel's topic"
|
||||||
if ctx.message.author.id != core_utils.my_id:
|
)
|
||||||
|
@option(name="new_channel_topic", description="The new topic", required=True)
|
||||||
|
async def topic(self, ctx, new_channel_topic):
|
||||||
|
if ctx.author.id != core_utils.my_id:
|
||||||
return
|
return
|
||||||
await ctx.message.delete()
|
await ctx.channel.edit(topic=new_channel_topic)
|
||||||
await ctx.message.channel.edit(topic=new_channel_topic)
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user