feat(Client): Warning Message, Update UserAgent

This commit is contained in:
Cinnamon
2022-06-25 10:11:05 +07:00
parent 9e4c0a506b
commit 6068ffc1d8
3 changed files with 18 additions and 9 deletions

View File

@@ -313,6 +313,15 @@ class Client extends BaseClient {
async login(token = this.token) {
if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID');
this.token = token = token.replace(/^(Bot|Bearer)\s*/i, '');
this.emit(
Events.DEBUG,
`
Logging on with a user token is unfortunately against the Discord
\`Terms of Service\` <https://support.discord.com/hc/en-us/articles/115002192352>
and doing so might potentially get your account banned.
Use this at your own risk.
`,
);
this.emit(
Events.DEBUG,
`Provided token: ${token