feat(Client): Warning Message, Update UserAgent
This commit is contained in:
@@ -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
|
||||
|
@@ -685,8 +685,8 @@ class WebSocketShard extends EventEmitter {
|
||||
// Clone the identify payload and assign the token and shard info
|
||||
client.options.ws.properties = Object.assign(client.options.ws.properties, {
|
||||
$browser_user_agent:
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36',
|
||||
$browser_version: '101.0.4951.54',
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
|
||||
$browser_version: '103.0.0.0',
|
||||
});
|
||||
const d = {
|
||||
...client.options.ws,
|
||||
|
Reference in New Issue
Block a user