Skip to content

nsslums/cit-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cit-bot

cit-bot

cit-botはdiscord上からcitサービスへのアスセスを行います.

pythonとjava での実装があります. 新しいバージョンを作成する場合は必ずブランチを作成してください.

初期設定

pip install discord.py
pip install load_dotenv

環境変数 .env

.envファイルは以下のように新しく作成し,必ず.gitignoreに追加されていることを確認してください. commitをしないように!

/cit-bot
 |-- java/
 |-- python/
 |-- .gitignore
 |-- .env

.envの内容はこちらを置き換えてお使いください.

TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxx"

オリジナルファイル

各ファイルのテンプレートです.(pantyetta.py)

import discord

def init(tree_bot):
    tree = tree_bot

     @tree.command(name="pantyetta",description="descriptioin")
    async def pantyetta(interaction: discord.Interaction):
        await interaction.response.send_message("pancho",ephemeral=True)#ephemeral=True→「これらはあなただけに表示されていす」

Bot.pyに

pantyetta.init(tree)

などの表記が必要です.

Command

/ohiru

引数

  1. private 個人メッセージを有効にするかを指定する事ができます.

更新:2023/04/17

About

CITの食堂に関する情報をお届けするDiscordBot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published