簡體   English   中英

Discord bot上的Heroku MyAnimeList API問題

[英]MyAnimeList api problem with heroku on discord bot

我正在嘗試制作Discord機器人,我需要MyAnimeList.net上的api。在計算機上啟動bot時,該命令有效,但是當我將bot上傳到Heroku.com時,該bot無法啟動。 我已經檢查了所有內容,並且問題出自此命令,但我找不到問題。

我也在cmd($ pip install mal-api)和($ pip install -U discord.py)中做到了這一點

import discord
from discord.ext import commands
import mal
from mal import *


client = commands.Bot(command_prefix = '.')

@client.command()
    async def mal(ctx, *, anime):
    from mal import AnimeSearch
    search = AnimeSearch(anime) 
    await ctx.send(search.results[0].url)

這是我發出命令的方式,請幫助我

我正在嘗試制作Discord機器人,我需要MyAnimeList.net上的api。在計算機上啟動bot時,該命令有效,但是當我將bot上傳到Heroku.com時,該bot無法啟動。 我已經檢查了所有內容,並且問題出自此命令,但我找不到問題。

我也在cmd($ pip install mal-api)和($ pip install -U discord.py)中做到了這一點

import discord
from discord.ext import commands
import mal
from mal import *


client = commands.Bot(command_prefix = '.')

@client.command()
    async def mal(ctx, *, anime):
    from mal import AnimeSearch
    search = AnimeSearch(anime) 
    await ctx.send(search.results[0].url)

這是我發出命令的方式,請幫助我

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM