Skip to content

Commit

Permalink
Merge branch 'feature/ban-improvement' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
janssensjelle committed Jan 25, 2025
2 parents 91ce660 + 71d383f commit 1519d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/cmds/core/user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import os
import random
from datetime import datetime
from typing import Tuple, Union

import discord
Expand Down Expand Up @@ -95,7 +94,7 @@ async def kick(self, ctx: ApplicationContext, user: Member, reason: str, evidenc
)

await ctx.guild.kick(user=member, reason=reason)
infraction_reason = f"Previously kicked on {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} for {reason} - Evidence: {evidence}"
infraction_reason = f"Previously kicked for {reason} - Evidence: {evidence}"
await add_infraction(ctx.guild, member, 0, infraction_reason, ctx.user)
return await ctx.respond(f"{member.name} got the boot!")

Expand Down
3 changes: 1 addition & 2 deletions tests/src/cmds/core/test_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from datetime import datetime
from unittest.mock import AsyncMock, patch

import pytest
Expand Down Expand Up @@ -31,7 +30,7 @@ async def test_kick_success(self, ctx, guild, bot, session):

reason = "Violation of rules"
add_infraction_mock.assert_called_once_with(
ctx.guild, user_to_kick, 0, f"Previously kicked on {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} for {reason} - Evidence: None", ctx.user
ctx.guild, user_to_kick, 0, f"Previously kicked for {reason} - Evidence: None", ctx.user
)

# Assertions
Expand Down

0 comments on commit 1519d75

Please sign in to comment.