Fix /autopurge add
This commit is contained in:
parent
5b08ca85e0
commit
d29978ecaf
2 changed files with 4 additions and 14 deletions
|
@ -36,7 +36,7 @@ jarvis = commands.Bot(
|
||||||
)
|
)
|
||||||
slash = SlashCommand(jarvis, sync_commands=True, sync_on_cog_reload=True)
|
slash = SlashCommand(jarvis, sync_commands=True, sync_on_cog_reload=True)
|
||||||
jarvis_self = Process()
|
jarvis_self = Process()
|
||||||
__version__ = "1.4.0"
|
__version__ = "1.4.1"
|
||||||
|
|
||||||
|
|
||||||
db = DBManager(get_config().mongo).mongo
|
db = DBManager(get_config().mongo).mongo
|
||||||
|
|
|
@ -14,18 +14,8 @@ from discord_slash.utils.manage_commands import create_choice, create_option
|
||||||
|
|
||||||
import jarvis
|
import jarvis
|
||||||
from jarvis.db import DBManager
|
from jarvis.db import DBManager
|
||||||
from jarvis.db.types import (
|
from jarvis.db.types import (Autopurge, Ban, Kick, Lock, MongoSort, Mute,
|
||||||
Autopurge,
|
Purge, Setting, Unban, Warning)
|
||||||
Ban,
|
|
||||||
Kick,
|
|
||||||
Lock,
|
|
||||||
MongoSort,
|
|
||||||
Mute,
|
|
||||||
Purge,
|
|
||||||
Setting,
|
|
||||||
Unban,
|
|
||||||
Warning,
|
|
||||||
)
|
|
||||||
from jarvis.utils import build_embed
|
from jarvis.utils import build_embed
|
||||||
from jarvis.utils.field import Field
|
from jarvis.utils.field import Field
|
||||||
from jarvis.utils.permissions import admin_or_permissions
|
from jarvis.utils.permissions import admin_or_permissions
|
||||||
|
@ -1127,7 +1117,7 @@ class AdminCog(commands.Cog):
|
||||||
elif delay > 300:
|
elif delay > 300:
|
||||||
await ctx.send("Delay must be < 5 minutes", hidden=True)
|
await ctx.send("Delay must be < 5 minutes", hidden=True)
|
||||||
return
|
return
|
||||||
autopurge = Autopurge(guild=ctx.guild.id, channel=channel.id)
|
autopurge = Autopurge.get(guild=ctx.guild.id, channel=channel.id)
|
||||||
if autopurge:
|
if autopurge:
|
||||||
await ctx.send("Autopurge already exists.", hidden=True)
|
await ctx.send("Autopurge already exists.", hidden=True)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue