mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix some typos in custom_context example
Also adds PyNaCl PyPI link in README
This commit is contained in:
parent
4b1059579e
commit
9e4bcd3df7
@ -59,7 +59,7 @@ To install the development version, do the following:
|
|||||||
Optional Packages
|
Optional Packages
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* PyNaCl (for voice support)
|
* `PyNaCl <https://pypi.org/project/PyNaCl/>`__ (for voice support)
|
||||||
|
|
||||||
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands:
|
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands:
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ class MyContext(commands.Context):
|
|||||||
await self.message.add_reaction(emoji)
|
await self.message.add_reaction(emoji)
|
||||||
except discord.HTTPException:
|
except discord.HTTPException:
|
||||||
# sometimes errors occur during this, for example
|
# sometimes errors occur during this, for example
|
||||||
# maybe you dont have permission to do that
|
# maybe you don't have permission to do that
|
||||||
# we dont mind, so we can just ignore them
|
# we don't mind, so we can just ignore them
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@ -39,13 +39,13 @@ async def guess(ctx, number: int):
|
|||||||
value = random.randint(1, 6)
|
value = random.randint(1, 6)
|
||||||
# with your new helper function, you can add a
|
# with your new helper function, you can add a
|
||||||
# green check mark if the guess was correct,
|
# green check mark if the guess was correct,
|
||||||
# or a red cross mark if it wasnt
|
# or a red cross mark if it wasn't
|
||||||
await ctx.tick(number == value)
|
await ctx.tick(number == value)
|
||||||
|
|
||||||
# important: you shouldnt hard code your token
|
# IMPORTANT: You shouldn't hard code your token
|
||||||
# these are very important, and leaking them can
|
# these are very important, and leaking them can
|
||||||
# let people do very malicious things with your
|
# let people do very malicious things with your
|
||||||
# bot. try to use a file or something to keep
|
# bot. Try to use a file or something to keep
|
||||||
# them private, and dont commit it to GitHub
|
# them private, and don't commit it to GitHub
|
||||||
token = "your token here"
|
token = "your token here"
|
||||||
bot.run(token)
|
bot.run(token)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user