mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-10 11:22:31 -05:00
Remove from __main__ import ... statements (#1956)
This commit is contained in:
committed by
Toby Harradine
parent
e874e6aa01
commit
a42c4fb215
@@ -2,7 +2,6 @@ from discord.ext import commands
|
||||
from .utils.chat_formatting import box
|
||||
from .utils.dataIO import dataIO
|
||||
from .utils import checks
|
||||
from __main__ import user_allowed, send_cmd_help
|
||||
from copy import copy
|
||||
import os
|
||||
import discord
|
||||
@@ -19,7 +18,7 @@ class Alias:
|
||||
async def alias(self, ctx):
|
||||
"""Manage per-server aliases for commands"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await send_cmd_help(ctx)
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
|
||||
@alias.command(name="add", pass_context=True, no_pm=True)
|
||||
@checks.mod_or_permissions(manage_server=True)
|
||||
@@ -121,7 +120,7 @@ class Alias:
|
||||
if not prefix:
|
||||
return
|
||||
|
||||
if server.id in self.aliases and user_allowed(message):
|
||||
if server.id in self.aliases and self.bot.user_allowed(message):
|
||||
alias = self.first_word(msg[len(prefix):]).lower()
|
||||
if alias in self.aliases[server.id]:
|
||||
new_command = self.aliases[server.id][alias]
|
||||
|
||||
Reference in New Issue
Block a user