def starattach(self, ctx, starboard_chan: discord.TextChannel):
"""Attach an existing channel as a starboard.
With this command you can create your starboard
without needing José to automatically create the starboard for you
"""
config = await self.get_starconfig(ctx.guild.id)
if config:
return await ctx.send('You already have a starboard config setup.')
config = empty_starconfig(ctx.guild)
config['starboard_id'] = starboard_chan.id
res = await self.starconfig_coll.insert_one(config)
if not res.acknowledged:
raise self.SayException('Failed to create starboard config (no ack)')
return
await ctx.send('Done!')
await ctx.ok()
评论列表
文章目录