Skip to content

Commit

Permalink
temp_role: properly read kick reason
Browse files Browse the repository at this point in the history
  • Loading branch information
gbionescu committed Jan 3, 2024
1 parent 296cca4 commit c60c22d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/temp_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,15 @@ def kick(
"""
<user [reason]> - Kick someone with an optional reason
"""
text = text.split()
text = text.split(maxsplit=1)
if len(text) == 0:
return kick.__doc__

user = user_id_to_object(str_to_id(text[0]))

reason = "Not given"
if len(text) > 1:
reason = text[1:]
reason = text[1]

if user is None:
return "User not found."
Expand Down

0 comments on commit c60c22d

Please sign in to comment.