xia的小窩

一起來coding和碼字吧

0%

python-Discord-bot,從0開始到做出一個機器人系列-27

補上缺漏和元素

games, economy之類的先補上

1
2
3
4
5
6
7
8
9
10
11
12
13
@commands.command()
async def sms(self, ctx):
sms = discord.Embed(title = "指令",
description = "忘記了嗎? 來看一下吧~~", color = 0x4599)
sms.add_field(name = "!ahoy", value = "Ahoy.gif", inline = True)
sms.add_field(name = "!clear", value = "用 !clear + 數字刪訊息", inline = True)
sms.add_field(name = "!sms", value = "等於 == !help", inline = True)
# 補
sms.add_field(name = "!games", value = "使用!games獲取更多訊息", inline = True)
sms.add_field(name = "!economy", value = "使用!economy獲取更多訊息", inline = True)
sms.add_field(name = "!plus", value = "訂單增加", inline = True)
sms.set_thumbnail(url = "https://www.formula-ai.com/wp-content/uploads/2020/09/python_or_java_meme.jpg")
await ctx.send(embed = sms)

補上各自的添加訊息 – games

1
2
3
4
5
6
7
8
# games
@commands.command()
async def games(self, ctx):
sms = discord.Embed(title = "games",
description = "playing games", color = 0x4599)
sms.add_field(name = "!guess", value = "玩終極密碼,賭注最高可下達至240", inline = True)
sms.set_thumbnail(url = "https://www.formula-ai.com/wp-content/uploads/2020/09/python_or_java_meme.jpg")
await ctx.send(embed = sms)

補上各自的添加訊息 – economy

1
2
3
4
5
6
7
8
9
10
11
12
13
# economy
@commands.command()
async def economy(self, ctx):
sms = discord.Embed(title = "economy",
description = "command統整", color = 0x4599)
sms.add_field(name = "!bag", value = "查看包包", inline = True)
sms.add_field(name = "!beg", value = "討錢", inline = True)
sms.add_field(name = "!buy", value = "買東西", inline = True)
sms.add_field(name = "!slots", value = "賭博", inline = True)
sms.add_field(name = "!money", value = "查看自己的戶頭", inline = True)
sms.add_field(name = "!market", value = "查看市場", inline = True)
sms.set_thumbnail(url = "https://www.formula-ai.com/wp-content/uploads/2020/09/python_or_java_meme.jpg")
await ctx.send(embed = sms)

接下來……

我們先使用MongoDB來取代Json……