我希望我的不和谐机器人在我执行某个命令时发送我电脑上的 mp3 文件。 假设命令是 -hello 当我说 -hello 时,我希望机器人在我的电脑上发送一个名为“hello”的 mp3 文件
我怎么能这样做?
答案 0 :(得分:0)
在此处查看此答案:Discord.py Bot sending file to Discord Channel 如果您想在邮件中附加文件,请使用
await ctx.send(file=discord.File(r'c:\location\of\the_file_to\send.mp3'))
答案 1 :(得分:0)
这里是使用 gXLg 发送的整个“代码”
[Opened /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
...
[Loaded java.text.AttributedCharacterIterator$Attribute from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.text.Format$Field from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.text.MessageFormat$Field from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.lang.Shutdown from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.lang.Shutdown$Lock from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
Error: Could not find or load main class aQute.launcher.Launcher