def check(ctx, exp, warn): exp_ = have_exp_check(ctx.message, exp) if not exp_ and warn: commons.bot.loop.create_task(comm.message_user(ctx.message, _(":x: You can't use this command, you don't have at least {exp} exp points!", prefs.getPref(ctx.message.server, "language")).format(**{ "exp": exp }))) return exp_
def check(ctx, warn): owner = is_owner_check(ctx.message) if not owner and warn: commons.bot.loop.create_task( comm.message_user( ctx.message, _( ":x: You can't use this command, you're not the bot owner!", prefs.getPref(ctx.message.server, "language")))) return owner
def check(ctx, warn): admin = is_owner_check(ctx.message) or is_admin_check(ctx.message) if not admin and warn: commons.bot.loop.create_task( comm.message_user( ctx.message, _( ":x: You can't use this command, you're not an admin on this server!", prefs.getPref(ctx.message.server, "language")))) return admin