-3

I am switching from Replit to PebbleHost to host my Python bot. What do I put in my requirements.txt file?

These are the imports that I have at the start of my bot.

import asyncio
import datetime
import functools
import io
import json
import os
import random
import re
import string
import urllib.parse
import urllib.request
import time
from urllib import parse, request
from itertools import cycle
from bs4 import BeautifulSoup as bs4
import cloudscraper
import discord, time
import random, threading
import asyncio
from discord.ext import commands
import aiohttp
import colorama
import discord
import numpy
import requests
from time import sleep
from discord import Permissions
from discord.ext import commands
from discord.utils import get
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
choppa
  • 11
  • 2
  • Don't run bots on replit. There's a dozen obvious reasons, but the ratelimiting is one of the biggest ones. Every bot shares the same IP address, so all of you _combined_ get ratelimited and you can't do anything about it. Restarting won't fix it for you. The platform isn't design to run bots on, don't abuse it for that - and if you do, accept the consequences. – stijndcl Nov 20 '22 at 20:02
  • Well it actually works pretty well for running my bot. I just need to figure out how to have it detect it’s a 429 error instead of all errors. – choppa Nov 20 '22 at 20:16
  • Which of those modules require external packages, rather than being found in the standard library? Which packages *are* those? That's what gets put in your `requirements.txt` file. – chepner Nov 20 '22 at 21:03
  • if you have a virtual environment where things are all working, you can activate it and do `python -m pip freeze > requirements.txt`. This will create a new .txt file in that location called requirements. Then in your new environment just put a copy of that file and then in the new environment do `python -m pip install -r requirements.txt` – scotscotmcc Nov 20 '22 at 21:16

1 Answers1

1

You just write the Packages you‘ve installed in it. If you write >= 1.17 the version has to be higher than 1.17

Example:

Discord.py
Pillow
Blue Robin
  • 847
  • 2
  • 11
  • 31
GladBarley
  • 11
  • 1