-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
サーバー内にある絵文字でスロットを回せる機能
経済機能に組み込む予定
@commands.command(name="slot")
async def slot(self, ctx: commands.Context):
emojis = ctx.guild.emojis
if len(emojis) < 3:
return await ctx.reply(content="少なくても絵文字が3つは必要です。")
emoji_1 = random.choice(emojis).__str__()
emoji_2 = random.choice(emojis).__str__()
emoji_3 = random.choice(emojis).__str__()
message = "はずれ・・"
if emoji_1 == emoji_2 and emoji_1 == emoji_3 and emoji_2 == emoji_3:
message = "あたり!"
await ctx.reply(embed=discord.Embed(title="スロットを回しました。", color=discord.Color.green(), description=f"{emoji_1} {emoji_2} {emoji_3}")
.add_field(name="結果", value=message, inline=False))
コードのメモ
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels