iT邦幫忙

鐵人檔案

2021 iThome 鐵人賽
回列表
自我挑戰組

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

從頭開始學習python,與建立一個屬於自己的機器人

參賽天數 25 天 | 共 30 篇文章 | 11 人訂閱 訂閱系列文 RSS系列文
DAY 21

開始花錢囉......?

先查看包包 包包check # cogs/money.py # 略 @bot.command() async def bag(ctx): await...

2021-09-21 ‧ 由 xiaLotus 分享
DAY 22

嗚咕,東西沒進到口袋裡 -- 探討Json

關於貨物沒進到口袋這檔事 回到剛才的函式,我們分為2部分,第一是如果存在,那amount的數字必須加上買的數量,第二是如果沒有,那就添加 #cogs/mon...

2021-09-22 ‧ 由 xiaLotus 分享
DAY 23

關於報錯這檔事

報錯 也就是所謂的error,我們有多種方式做處理 第一種 使用廣泛類型 # cogs/event.py # 略 @commands.Cog.liste...

2021-09-23 ‧ 由 xiaLotus 分享
DAY 24

使用貼圖新增與移除身分組

使用Auttaja 點擊Dashboard 選擇Assignable & Giveable Roles 在聊天室輸入 -assignrole...

2021-09-24 ‧ 由 xiaLotus 分享
DAY 25

終極密碼DC版

撰寫大家熟知的終極密碼 示意圖 開始撰寫 # cogs/guess.py @commands.command() async def guess(self...

2021-09-25 ‧ 由 xiaLotus 分享
DAY 25

小物件實作

鬧鐘 # cogs/......略 @commands.command() async def clock(self, ctx, mins, todo):...

2021-09-27 ‧ 由 xiaLotus 分享
DAY 25

統整先前的小缺漏

補上缺漏和元素 games, economy之類的先補上 @commands.command() async def sms(self, ctx):...

2021-09-28 ‧ 由 xiaLotus 分享
DAY 25

使用MongoDB -- 資料庫簡易上手

1. 註冊及登入mongo database 2. Altas 點這邊 之後應該會出現這個畫面 點擊Add new project next後,cr...

2021-09-28 ‧ 由 xiaLotus 分享
DAY 25

將MongoDB加進discord-bot

建立 data.py 套入 pip install mongo bot_id.json { "token":"You...

2021-09-28 ‧ 由 xiaLotus 分享
DAY 25

將機器人部屬到網路上去

開始部屬 點擊 登入後會看到這個畫面 點擊左上方的加號 進行第一次的線上coding 在main上輸入 import discord 等...

2021-09-28 ‧ 由 xiaLotus 分享