dolfies / discord.py-self

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

Attribute bot.user.name/ bot.user.discriminator not updating after changing API token #198

Closed pickaxe828 closed 2 years ago

pickaxe828 commented 2 years ago

Summary

Attribute bot.user.name/ bot.user.discriminator not updating after changing API token

Reproduction Steps

Use the code:

import discord
from discord.ext import commands

bot = commands.Bot(command_prefix=">", self_bot=True)

@bot.event
async def on_ready():
    print(f"Logged in as {bot.user.name}#{bot.user.discriminator}")

@bot.command()
async def ping(ctx):
    await ctx.send("pong")

bot.run("token")

Run it for the first time with a token, and run it one more time with another token. Then you'll get two same bot.user.name and bot.user.discriminator printed in the console.

Code

No response

Expected Results

Expected the bot.user.name/ bot.user.discriminator will change with changing the token when on_ready

Actual Results

The bot.user.name/ bot.user.discriminator doesn't change with the token.

System Information

- Python v3.9.6-final
- discord.py-self v1.9.1-final
- aiohttp v3.7.3
- system info: Windows 10 10.0.22000

Checklist

dolfies commented 2 years ago

The issue was resolved?

pickaxe828 commented 2 years ago

Yes and I just found out that it was my problem 😂😂😂