diff options
author | romangraef <romangraef@gmail.com> | 2019-09-08 21:41:01 +0200 |
---|---|---|
committer | romangraef <romangraef@gmail.com> | 2019-09-08 21:41:01 +0200 |
commit | fbd1f326d8a07ae7a3eb9871a254b85b2e4a79cf (patch) | |
tree | 7332a03df755325f6b8988edd0b6414790f32f34 /examples/main.py | |
parent | e465725dc6be4b66efb66bf54c8758c58de893e5 (diff) | |
download | drutils-fbd1f326d8a07ae7a3eb9871a254b85b2e4a79cf.tar.gz drutils-fbd1f326d8a07ae7a3eb9871a254b85b2e4a79cf.tar.bz2 drutils-fbd1f326d8a07ae7a3eb9871a254b85b2e4a79cf.zip |
Diffstat (limited to 'examples/main.py')
-rw-r--r-- | examples/main.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/main.py b/examples/main.py new file mode 100644 index 0000000..617b4aa --- /dev/null +++ b/examples/main.py @@ -0,0 +1,16 @@ +from os import environ + +from discord.ext.commands import Bot, Greedy, MemberConverter + +from drutils import non_nullable + +bot = Bot(command_prefix="!") + + +@bot.command() +async def converter_test(ctx, members: Greedy[non_nullable(MemberConverter)]): + await ctx.send('\n'.join(member.name for member in members)) + + +if __name__ == '__main__': + bot.run(environ['TOKEN']) |