Cog-Creators / Red-DiscordBot

A multi-function Discord bot
https://docs.discord.red
GNU General Public License v3.0
4.84k stars 2.31k forks source link

implemented warn by userID #6476

Closed Ascensionn closed 5 days ago

Ascensionn commented 5 days ago

Description of the changes

As per #6445, added feature to make reddiscordbot be able to warn a user by their userID or their name. It was a simple short change

Have the changes in this PR been tested?

image image

Kowlin commented 5 days ago

Hey there, Thank you for your contribution, however. This functionality is already build in the handler of Discord.py's discord.Member argument. Where it will check if the author of a command has included a mention, display name, full username or user ID. Therefor this PR is not required.

Flame442 commented 5 days ago

The linked issue is specific to the case where the user has left the server. In that case, the Member converter will not work with an ID, as it only matches users that are currently in the server. The fix for the issue requires additional consideration, as the command expects a fully resolved Member object that would not be available if the user is no longer in the server. This change, using get_member, also relies on the user being in the server.