Q&A
前提
python3.9でdiscord.pyを仮想環境(venv)から実行しました。
実現したいこと
いつもはSSHで(venv) %と表示されていますがdiscord.pyを実行すると(venv) %がなくなり何も受け付けなくなります。
この状態は実行中ということでよろしいでしょうか?ctrl + Cで強制終了すれば元にもどりますが、終了せずに元に戻ることはできるのでしょうか?
また、終了はctrl + Cでよいのでしょうか?discord.pyを編集した場合は強制終了してファイルを書き換えまた実行しています。
該当のソースコード
ssh
1% source bin/activate.csh 2(venv) % python discord.py 32022-09-21 17:12:13 INFO discord.client logging in using static token 42022-09-21 17:12:14 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: xxxxxxxxxxxxxxxxxxxxxxxxx).
discord.py
1import discord 2from discord.ext import commands 3from discord.ext import tasks 4 5bot = commands.Bot(command_prefix="/",intents=discord.Intents.all()) 6 7 8@bot.command() 9async def sakura(ctx): 10 channel_sent = bot.get_channel(1012237139729197256) 11 await channel_sent.send("はじめて") 12 13 14token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx' 15bot.run(token)
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
2022/09/21 13:58