aboutsummaryrefslogtreecommitdiff
path: root/examples/main.py
diff options
context:
space:
mode:
authorromangraef <romangraef@gmail.com>2019-09-08 21:41:01 +0200
committerromangraef <romangraef@gmail.com>2019-09-08 21:41:01 +0200
commitfbd1f326d8a07ae7a3eb9871a254b85b2e4a79cf (patch)
tree7332a03df755325f6b8988edd0b6414790f32f34 /examples/main.py
parente465725dc6be4b66efb66bf54c8758c58de893e5 (diff)
downloaddrutils-master.tar.gz
drutils-master.tar.bz2
drutils-master.zip
i mean its kinda my own fault for releasing without testingHEAD1.1.2master
Diffstat (limited to 'examples/main.py')
-rw-r--r--examples/main.py16
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'])