- Install dependencies -
python3 -m pip install -r requirements.txt
安裝依賴 -
python3 -m pip install -r requirements.txt
- Modify main.py file
修改 main.py 檔案
- Run the program -
python3 main.py
執行程式
python3 main.py
At same main.py path , Create a new pass.txt and enter the password in the content.
在 main.y 相同目錄下 新建 pass.txt 並在內容輸入密碼.
Change your keyword list
更改為你的關鍵字
itemlist = ["share", "builds", "overclock"]
Change your instagram hash tag
更改你的 IG 主題標籤
hashtag = "-\n#PCSetUp #PCBuilding #PCbuilds"
ig_caption variable is the text content sent to instagram.
ig_caption 變數是發往 instagram 的文字內容.
ig_caption = str(message.author)+"posted on" + \
str(message.channel.name)+"\n" + \
f'{message.content}\n\n{hashtag}'
variable
str(message.author) is author who send it from discord.
str(message.author) 是從 discord 發送它的作者
"posted on" can change to your language.
str(message.channel.name) which channel in discord was sent from.
str(message.channel.name) 是從 discord 哪個頻道發送的。
message.content is the message content
Replace to instagram account id
替換成 IG 頻道帳號
insta_client.login("BOT_USE_INSTAGRAM_ACCOUNT_ID",open('pass.txt', 'r').read())
Change your discord bot token
修改你的 discord bot token
bot.run('YOUR Discord bot tokem')
若不清楚如何建立機器人及取得 token 可參考 How to Get a Discord Bot Token