Merge branch 'main' into 'gitlabcog'
# Conflicts: # jarvis/__init__.py
This commit is contained in:
commit
85fb441c59
2 changed files with 4 additions and 3 deletions
|
@ -247,7 +247,7 @@ async def on_guild_join(guild):
|
||||||
@loop(minutes=1)
|
@loop(minutes=1)
|
||||||
async def unmute():
|
async def unmute():
|
||||||
mutes = Mute.get_active(duration={"$gt": 0})
|
mutes = Mute.get_active(duration={"$gt": 0})
|
||||||
mute_roles = Setting.get(setting="mute")
|
mute_roles = Setting.get_many(setting="mute")
|
||||||
updates = []
|
updates = []
|
||||||
for mute in mutes:
|
for mute in mutes:
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -796,6 +796,7 @@ class AdminCog(commands.Cog):
|
||||||
admin=ctx.author.id,
|
admin=ctx.author.id,
|
||||||
guild=ctx.guild.id,
|
guild=ctx.guild.id,
|
||||||
duration=duration,
|
duration=duration,
|
||||||
|
active=True,
|
||||||
).insert()
|
).insert()
|
||||||
fields = [Field("Reason", reason, False)]
|
fields = [Field("Reason", reason, False)]
|
||||||
embed = build_embed(
|
embed = build_embed(
|
||||||
|
@ -825,7 +826,7 @@ class AdminCog(commands.Cog):
|
||||||
)
|
)
|
||||||
@commands.has_permissions(administrator=True)
|
@commands.has_permissions(administrator=True)
|
||||||
async def _warnings(self, ctx: SlashContext, user: User):
|
async def _warnings(self, ctx: SlashContext, user: User):
|
||||||
await ctx.defer()
|
await ctx.defer(hidden=True)
|
||||||
warnings = Warning.get_many(user=user.id, guild=ctx.guild.id)
|
warnings = Warning.get_many(user=user.id, guild=ctx.guild.id)
|
||||||
active = [
|
active = [
|
||||||
f'`{y.created_at.strftime("%Y-%m-%d %H:%M:%S")}` - {y.reason}'
|
f'`{y.created_at.strftime("%Y-%m-%d %H:%M:%S")}` - {y.reason}'
|
||||||
|
@ -910,7 +911,7 @@ class AdminCog(commands.Cog):
|
||||||
f"Role `{role.name}` not in blocklist.", hidden=True
|
f"Role `{role.name}` not in blocklist.", hidden=True
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
roles.value.delete(role.id)
|
roles.value.remove(role.id)
|
||||||
roles.update()
|
roles.update()
|
||||||
await ctx.send(f"Role `{role.name}` removed blocklist.")
|
await ctx.send(f"Role `{role.name}` removed blocklist.")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue