async def _get_admin(self, ctx: SlashContext) -> None: if ctx.guild is None: await ctx.send( content= ("You've either ran this command in a dm or in a server without the bot user!" "\nYou cannot run this command in dms" "\nAnd a bot user is required for this command to work!" "\nPlease invite me, invite link here: https://messagemanager.xyz/invite" ), hidden=True, ) return if ctx.author is None: ctx.author = await ctx.guild.fetch_member(ctx.author_id) try: msg = await self.logic_functions.get_admin_role_logic( ctx.guild, ctx.author) except commands.MissingPermissions as e: await ctx.send(content=str(e), hidden=True) return if isinstance(msg, str): await ctx.send(content=msg) else: await ctx.send(embeds=[msg])
async def _set_admin( self, ctx: SlashContext, role: Optional[Union[discord.Role, int, str]] = None, ) -> None: if ctx.guild is None: await ctx.send( content= ("You've either ran this command in a dm or in a server without the bot user!" "\nYou cannot run this command in dms" "\nAnd a bot user is required for this command to work!" "\nPlease invite me, invite link here: https://messagemanager.xyz/invite" ), hidden=True, ) return if ctx.author is None: ctx.author = await ctx.guild.fetch_member(ctx.author_id) if not isinstance(role, (int, str)) and role is not None: role = role.id if role is not None: role = str(role) try: msg = await self.logic_functions.set_admin_role_logic( ctx.guild, ctx.author, role) except Exception as e: if isinstance( e, ( errors.InputContentIncorrect, commands.MissingPermissions, errors.WebhookChannelNotTextChannel, ), ): await ctx.ack(hidden=True) await ctx.send(content=str(e), hidden=True) return else: raise await ctx.send(embeds=[msg])
async def deposit_slash(self, ctx: SlashContext): ctx.author = await self.bot.fetch_user(ctx.author) r = await self._deposit(ctx) await ctx.send(embeds=[r[0]], content=f'```{r[1]}```')
async def withdrawall_slash(self, ctx: SlashContext, address): ctx.author = await self.bot.fetch_user(ctx.author) embed = await self._withdrawall(ctx, address) await ctx.send(embeds=[embed])
async def claim_slash(self, ctx: SlashContext): ctx.author = await self.bot.fetch_user(ctx.author) embed = await self._make_claim(ctx) await ctx.send(embeds=[embed])
async def tip_clog(self, ctx: SlashContext, user, amount): ctx.author = await self.bot.fetch_user(ctx.author) embed = await utility.make_embed(ctx, self.bot, color=0xffd800) embed = await self._tip(ctx, embed, str(user.id), amount) await ctx.send(embeds=[embed])
async def balance_clog(self, ctx: SlashContext): ctx.author = await self.bot.fetch_user(ctx.author) embed = await self._balance(ctx) await ctx.send(embeds=[embed])