Skip to content

Commit 830e87c

Browse files
committed
Fixed examples
1 parent 217deee commit 830e87c

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ slash = SlashCommand(bot)
1515
@slash.slash(name="test")
1616
async def _test(ctx: SlashContext):
1717
embed = discord.Embed(title="embed test")
18-
await ctx.send(text="test", embeds=[embed])
18+
await ctx.send(content="test", embeds=[embed])
1919

2020

2121
bot.run("discord_token")

discord_slash/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ def slash(self,
6262
6363
@slash.slash(name="ping")
6464
async def _slash(ctx): # Normal usage.
65-
await ctx.send(text=f"Pong! (`{round(bot.latency*1000)}`ms)")
65+
await ctx.send(content=f"Pong! (`{round(bot.latency*1000)}`ms)")
6666
6767
6868
@slash.slash(name="pick")
6969
async def _pick(ctx, choice1, choice2): # Command with 1 or more args.
70-
await ctx.send(text=str(random.choice([choice1, choice2])))
70+
await ctx.send(content=str(random.choice([choice1, choice2])))
7171
7272
Example of formatting ``auto_convert``:
7373

discord_slash/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ async def send(self,
5454
:param tts: Whether to speak message using tts. Default ``False``.
5555
:type tts: bool
5656
:param allowed_mentions: AllowedMentions of the message.
57+
:type allowed_mentions: List[discord.AllowedMentions]
5758
:return: ``None``
5859
"""
5960
if embeds and len(embeds) > 10:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Example:
2525
@slash.slash(name="test")
2626
async def _test(ctx: SlashContext):
2727
embed = discord.Embed(title="embed test")
28-
await ctx.send(text="test", embeds=[embed])
28+
await ctx.send(content="test", embeds=[embed])
2929
3030
3131
bot.run("discord_token")

0 commit comments

Comments
 (0)