I'm trying to use the Discord Interactions library. I writed this code in python :
import interactions
from dotenv import load_dotenv
load_dotenv()
BOT_KEY = os.getenv("BOT_KEY")
if BOT_KEY is None:
raise ValueError("BOT_KEY not found")
class MainClient:
def __init__(self) -> None:
intents = interactions.Intents.ALL
self.Client = interactions.Client(BOT_KEY, intents=intents)
def start(self):
self.Client.start()
interactions_client = MainClient()
@interactions_client.Client.event(name="on_ready")
async def on_ready():
print("Bot command ready")
@interactions_client.Client.command(name="test", description="Do nothing, just a test")
async def test(context: interactions.CommandContext):
pass
interactions_client.start()
I got this warning when i lauch the bot: "The HTTP client has exhausted a per-route ratelimit. Locking route for 0.999 seconds." The bot is runnig and is functionnal but i am concerned about this warning, I would like to understand it, fix the issue, and use this library correctly, but I don't see what I did wrong in my code. And I cannot find any helpful information that shows me my error. Furthermore, this library is not known to ChatGPT :(
I was looking Discord.py: 429 rate limit. What does "not making requests on exhausted buckets until after they have reset" exactly mean?.
But i didnt understand whats the problems in my code. I dont see where i do too many request.
I hope someone explains my error to me and how to correct it