当互联网连接关闭时,该机器人会因错误而完全关闭。 我无法设法将我的 bot.run() 调用正确地放入循环中,以便在每个此类错误时完全关闭。 在stackoverflow 上,这里有一些关于循环 client.run() 的答案,但似乎它们对于 bot.run() 来说并不是那么好python python-3.x discord discord.py 1个回答 0投票 看起来...
以下是我的代码,如果有帮助的话: import discord import os import random import praw from keep_alive import keep_alive from discord.ext import commands from discord.ext.commands import Bot import time client = commands.Bot(command_prefix='.') sec_triggers = ['just a sec', 'Just a sec', ...
scp bot.py requirements.txtsammy@your_server_ip:~ 接下来,通过 ssh 进入您的服务器: sshsammy@my_server_ip 您现在将在服务器的终端中输入命令。 您需要安装正确的 Python 系统包才能在您的服务器上运行您的机器人。 安装python3,python3-venv以及screen: sudo apt update && sudo apt install python3 pyt...
python discord discord.py 我为我的discord.py机器人创建了一个join命令。用户可以指定bot要连接的频道,也可以不指定,然后bot将连接到用户的频道。但它不起作用。没有错误。它总是发出“错误!找不到频道。“。 @bot.command() async def join(ctx, *channelname): if channelname is None: try: channel=...
问discord bot (python)如何使用wait_for等待消息或反应EN我正在为我的discord机器人做一种琐碎的命令,...
在manage.py的同级目录下新建一个run.py import os if __name__ == '__main__': #加载...
Python discord bot main函数返回“”无法从正在运行的事件循环中调用asynio.run()”您使用的是相对路径...
Discode is a Discord bot that runs code. It has been originally written for C++ support and it will remain the priority. Why? I spend a lot of time on Discord and I hang out in several programming related servers. It's quite common place to see people asking for help about their code...
pythondiscorddiscordpytokendiscord-tokendiscordtokendiscord-token-generatordiscord-token-gen UpdatedMay 9, 2023 Python Raptor123471/DingoLingo Star281 Code Issues Pull requests Discussions A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom ...
(无关小提琴)的闲聊, 摸爬滚打,把所有能踩的坑都踩了,终于成功通过 python 把 chatGPT bot (对话机器人) 添加到 Discord ,等于是把灵魂注入了天才画家(一个比喻,别较真)。 首先说下目的:单独的MJ和单独的G…