dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
648 stars 153 forks source link

Delay?? #646

Closed DaddyBap closed 6 months ago

DaddyBap commented 6 months ago

Summary

So when I run the bot and do commands sometimes the commands a really delayed And I would like to know the issue Or if its just for everyone I have written 390 lines of this and I don't want it going to waste

Reproduction Steps

Just running it normally

Code

import discord
import urllib.parse
import asyncio
import random
import requests
import ctypes
import uuid
import time
import os
from discord.ext import commands
from discord.utils import snowflake_time
# obviousely removed all of my other code I dont want skidders!!
os.system('cls')

with open('token.txt', 'r') as f:
    token = f.read().strip()

bot = commands.Bot(command_prefix='-', self_bot=True)
bot.remove_command('help')

@bot.command()
async def ping(ctx):
    await ctx.message.delete()
    await ctx.send(f'{bot.latency * 1000} ms')

bot.run(token)

Expected Results

Running normally like a discord bot

Actual Results

Its having a delay sometimes not all the times but its mad annoying

System Information

Checklist

Additional Information

running 3.10.4 Cause to me its the most stable version of python

DaddyBap commented 6 months ago

I fixed it