Skip to content
Discussion options

You must be logged in to vote

Hey there,

It's probably best to use the commands extension as it makes working with arguments much easier.

If you did use it, you could pass a user argument, which you could typehint to discord.Member (or discord.User if you wanted to use it outside of guilds).

This would then allow the library to convert the input to a member/user object (assuming it's valid) so that you can mention them with member.mention along with sending the file.

You can read about commands here: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html and typehinting to discord models (such as discord.Member) here: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html#discord-converters

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mesub7
Comment options

@Skigamer13
Comment options

@Skigamer13
Comment options

@Skigamer13
Comment options

@mesub7
Comment options

Answer selected by Skigamer13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants