A
A
AdvoKappa2020-06-09 22:32:40
Python
AdvoKappa, 2020-06-09 22:32:40

Why is Discord Bot not showing up online on Heroku Hosting?

File name: Goa.py
Code itself:

import discord
from discord.ext import commands
from discord.ext.commands import Bot

bot = commands.Bot(command_prefix = '!')

@bot.event
async def on_ready():
  print('Bot connected')

@bot.event
async def on_member_join(member):
  channel = bot.get_channel(667108089538805802)

  role = discord.utils.get(member.guild.roles, id = 696646683072921610)

  await member.add_roles(role)
  await channel.send(f'{member.mention} присоеденился к нам!')

bot.run('TOKEN')


TOKEN Listed as an addon on the Heroku website.

Procfile:
worker: python3 Goa.py

requirements.txt:
discord.py==1.3.3

runtime.txt:
python-3.8.3

I do everything according to the Heroku CLI instructions, with git push heroku master pushes without error, on the heroku website in the overlay procfile is marked as On. When deploying to the site itself, there is no error either.
But the bot does not appear on the network, why is this happening?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dedosg, 2020-06-09
@Dedosg

In requirements.txt you didn't specify the discord API version (discord.py==version)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question