async def command(self, message, name): if not name: return 'Give me the name you baka!!!' tag_val = await executor( self, DB.child('Tags').child(name.lower()).get().val) if tag_val is None: msg = await self.message_create(message.channel, 'Tag not found') await sleep(69) await self.message_delete(msg) return if tag_val['embed']: await self.message_create( message.channel, Embed( name.lower(), tag_val['content'], color=colourfunc(message), )) else: await self.message_create(message.channel, tag_val['content'], allowed_mentions=None) tag_val['uses'] += 1 await executor( self, DB.child('Tags').child(name.lower()).set(tag_val).update)
async def description(self, message): return Embed( title = 'tag-create', color = colourfunc(message = message), description = \ 'Creates a new tag for you' '\nDo `m!tag-create <name> | <value> | [anything if you dont want to embed]`', )
async def description(self, message): prefix = self.command_processer.get_prefix_for(message) return Embed( title='Role Command', color=colourfunc(message), description=('Gives or removes the given role\n' f'To list all role do `{prefix}role all`'), ).add_footer(f'Usage: {prefix}role <role-name> | <all>')
async def command(self, message): bonk = sorted(list((await executor(self, DB.child('Tags').shallow().get().val))\ or ['We dont have tags for now'])) color = colourfunc(message) pages = [ Embed('Tags', tag_name, color=color) for tag_name in chunkify(bonk) ] limit = len(pages) index = 0 while index < limit: embed = pages[index] index += 1 embed.add_footer(f'page {index}/{limit}') await Pagination(self, message.channel, pages)
async def command(self, message, name): if not name: return 'Give me the name you baka!!!' tag_data = await executor( self, DB.child('Tags').child(name.lower()).get().val) if tag_data is None: return "tag not found" owner = User.precreate(tag_data["owner"]) return Embed( f"**Tag: {name}**", f"**Use Count** : {tag_data['uses']}"\ f"\n**Created At**: {id_to_time(tag_data['id'])}"\ f"\n**Created By**: <@!{owner.id}>", color = colourfunc(message), ).add_author(owner.avatar_url, owner.name)
async def description(self, message): return Embed( title='tag-info', color=colourfunc(message=message), description="Do `m!tag-info <name>`", )
async def description(self, message): return Embed( title='tag-del', color=colourfunc(message=message), description="Do `m!tag-del <name>` to remove the given tag", )
async def description(self, message): return Embed( title='tag-all', color=colourfunc(message=message), description="Do `m!tag <name>` to list all tag", )