discord.js-selfbot-v13/Document/User.md

171 lines
4.6 KiB
Markdown
Raw Normal View History

# Quick Links:
- [Setting](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md#user-settings)
- [User Info](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md#discord-user-info)
- [Relationship](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md#discord-user-friend--blocked)
- [Other](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/Document/User.md#user--clientuser-method)
2022-04-10 13:11:20 +00:00
## User Settings
2022-05-21 14:14:59 +00:00
<details open>
2022-04-10 13:11:20 +00:00
<summary><strong>Click to show</strong></summary>
```js
client.setting // Return Data Setting User;
2022-08-20 14:50:22 +00:00
client.settings.setDisplayCompactMode(true | false); // Message Compact Mode
client.settings.setTheme('dark' | 'light'); // Discord App theme
client.settings.setLocale(value); // Set Language
2022-04-10 13:11:20 +00:00
/**
* * Locale Setting, must be one of:
* * `DANISH`
* * `GERMAN`
* * `ENGLISH_UK`
* * `ENGLISH_US`
* * `SPANISH`
* * `FRENCH`
* * `CROATIAN`
* * `ITALIAN`
* * `LITHUANIAN`
* * `HUNGARIAN`
* * `DUTCH`
* * `NORWEGIAN`
* * `POLISH`
* * `BRAZILIAN_PORTUGUESE`
* * `ROMANIA_ROMANIAN`
* * `FINNISH`
* * `SWEDISH`
* * `VIETNAMESE`
* * `TURKISH`
* * `CZECH`
* * `GREEK`
* * `BULGARIAN`
* * `RUSSIAN`
* * `UKRAINIAN`
* * `HINDI`
* * `THAI`
* * `CHINA_CHINESE`
* * `JAPANESE`
* * `TAIWAN_CHINESE`
* * `KOREAN`
*/
2022-04-16 15:56:18 +00:00
// Setting Status
2022-08-20 14:50:22 +00:00
client.settings.setCustomStatus({
2022-04-16 15:56:18 +00:00
status: 'online', // 'online' | 'idle' | 'dnd' | 'invisible' | null
text: 'Hello world', // String | null
emoji: '🎮', // UnicodeEmoji | DiscordEmoji | null
expires: null, // Date.now() + 1 * 3600 * 1000 <= 1h to ms
});
// => Clear
2022-08-20 14:50:22 +00:00
client.settings.setCustomStatus();
2022-04-10 13:11:20 +00:00
```
</details>
## Discord User Info
2022-05-21 14:14:59 +00:00
<details open>
2022-04-10 13:11:20 +00:00
<summary><strong>Click to show</strong></summary>
Code:
```js
GuildMember.user.getProfile();
// or
User.getProfile();
```
Response
```js
User {
id: '721746046543331449',
bot: false,
system: false,
flags: UserFlagsBitField { bitfield: 256 },
connectedAccounts: [],
premiumSince: 1623357181151,
premiumGuildSince: 0,
2022-04-27 03:48:33 +00:00
bio: null,
2022-04-10 13:11:20 +00:00
mutualGuilds: Collection(3) [Map] {
'906765260017516605' => { id: '906765260017516605', nick: null },
'809133733591384155' => { id: '809133733591384155', nick: 'uwu' },
'926065180788531261' => { id: '926065180788531261', nick: 'shiro' }
},
username: 'Shiraori',
discriminator: '1782',
avatar: 'f9ba7fb35b223e5f1a12eb910faa40c2',
banner: undefined,
accentColor: undefined
}
```
</details>
## Discord User Friend / Blocked
2022-05-21 14:14:59 +00:00
<details open>
2022-04-10 13:11:20 +00:00
<summary><strong>Click to show</strong></summary>
Code:
```js
// You can use client.relationships to manage your friends and blocked users.
2022-04-10 13:11:20 +00:00
GuildMember.user.setFriend();
User.unFriend();
Message.member.user.sendFriendRequest();
// or
GuildMember.user.setBlock();
User.unBlock();
```
Response
```js
User {
id: '721746046543331449',
bot: false,
system: false,
flags: UserFlagsBitField { bitfield: 256 },
note: null,
connectedAccounts: [],
premiumSince: 1623357181151,
premiumGuildSince: 0,
2022-04-27 03:48:33 +00:00
bio: null,
2022-04-10 13:11:20 +00:00
mutualGuilds: Collection(3) [Map] {
'906765260017516605' => { id: '906765260017516605', nick: null },
'809133733591384155' => { id: '809133733591384155', nick: 'uwu' },
'926065180788531261' => { id: '926065180788531261', nick: 'shiro' }
},
username: 'Shiraori',
discriminator: '1782',
avatar: 'f9ba7fb35b223e5f1a12eb910faa40c2',
banner: undefined,
accentColor: undefined
}
```
</details>
## User & ClientUser Method
2022-05-21 14:14:59 +00:00
<details open>
2022-04-13 10:51:43 +00:00
<summary><strong>Click to show</strong></summary>
2022-04-10 13:11:20 +00:00
```js
// HypeSquad
await client.user.setHypeSquad('HOUSE_BRAVERY');
await client.user.setHypeSquad('HOUSE_BRILLIANCE');
await client.user.setHypeSquad('HOUSE_BALANCE');
await client.user.setHypeSquad('LEAVE');
2022-04-10 13:11:20 +00:00
// Set Note to User
await user.setNote('Hello World');
// Set Username
await client.user.setUsername('new username', 'password');
// Set Accent Color
await client.user.setAccentColor('RED'); // set color same as Embed.setColor()
// Set Banner
await client.user.setBanner('image file / image url'); // same as setAvatar & Require Nitro level 2
// Set Discord Tag
await client.user.setDiscriminator('1234', 'password'); // #1234 & Require Nitro
// Set About me
await client.user.setAboutMe('Hello World');
// Set Email
await client.user.setEmail('aiko.dev@mail.nezukobot.vn', 'password'); // It is clone email =))
// Change Password
await client.user.setPassword('old password', 'new password');
// Disable Account
await client.user.disableAccount('password');
// Delete Account [WARNING] Cannot be changed once used!
await client.user.deleteAccount('password');
2022-04-25 13:22:24 +00:00
// Redeem Nitro
await client.redeemNitro('code')
2022-04-10 13:11:20 +00:00
```
2022-04-19 15:33:02 +00:00
</details>