Skip to content

Commit 485484e

Browse files
committed
🎲/randomrange embed fix, deploy is automated on push to main
1 parent f1fe853 commit 485484e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/deploy.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Update Bot
22
on:
3+
push:
4+
branches: [ main ]
35
workflow_dispatch:
46

57
jobs:

cogs/fun/randoms.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ async def randomrange(self, ctx, minimum: str='-2147483648', maximum: str='21474
2626
if minimum > maximum:
2727
minimum, maximum = maximum, minimum
2828
result = randint(minimum, maximum)
29-
embed = discord.Embed(color=no_color, title=f"{Emojis.dice} Рандомное число между {minimum} и {maximum}:")
30-
embed.add_field(name=result, value='', inline=True)
29+
embed = discord.Embed(color=no_color)
30+
embed.description = f"# {Emojis.dice} Рандомное число между {minimum} и {maximum}:\n## {result}"
3131
await ctx.reply(embed=embed, allowed_mentions=no_ping)
3232

3333
@randomrange.error
3434
async def randomrange_error(self, ctx, error):
3535
await handle_errors(ctx, error, [
3636
{
3737
"contains": "ValueError",
38-
"msg": "Допускаются только целочисленные занчения"
38+
"msg": "Допускаются только целочисленные занчения, между числами должен быть пробел"
3939
}
4040
])
4141

0 commit comments

Comments
 (0)