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)
|
||||
jarvis_self = Process()
|
||||
__version__ = "1.4.0"
|
||||
__version__ = "1.4.1"
|
||||
|
||||
|
||||
db = DBManager(get_config().mongo).mongo
|
||||
|
|
|
@ -14,18 +14,8 @@ from discord_slash.utils.manage_commands import create_choice, create_option
|
|||
|
||||
import jarvis
|
||||
from jarvis.db import DBManager
|
||||
from jarvis.db.types import (
|
||||
Autopurge,
|
||||
Ban,
|
||||
Kick,
|
||||
Lock,
|
||||
MongoSort,
|
||||
Mute,
|
||||
Purge,
|
||||
Setting,
|
||||
Unban,
|
||||
Warning,
|
||||
)
|
||||
from jarvis.db.types import (Autopurge, Ban, Kick, Lock, MongoSort, Mute,
|
||||
Purge, Setting, Unban, Warning)
|
||||
from jarvis.utils import build_embed
|
||||
from jarvis.utils.field import Field
|
||||
from jarvis.utils.permissions import admin_or_permissions
|
||||
|
@ -1127,7 +1117,7 @@ class AdminCog(commands.Cog):
|
|||
elif delay > 300:
|
||||
await ctx.send("Delay must be < 5 minutes", hidden=True)
|
||||
return
|
||||
autopurge = Autopurge(guild=ctx.guild.id, channel=channel.id)
|
||||
autopurge = Autopurge.get(guild=ctx.guild.id, channel=channel.id)
|
||||
if autopurge:
|
||||
await ctx.send("Autopurge already exists.", hidden=True)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue