Feat/users page #190
Errors 9, Warnings 9
Found 9 errors and 9 warnings
Annotations
Check failure on line 5 in app/api/get-discord-server-members/src/get-discord-server-members.api.ts
github-actions / Lint
(@typescript-eslint/no-unused-vars): 'discordServerMembers' is assigned a value but never used.
'discordServerMembers' is assigned a value but never used.
Raw output
2 |
3 | export const getDiscordServerMembersHandle = async (request: Request) => {
> 4 | const discordServerMembers = await getDiscordServerMembers()
| ^
5 | }
6 |
github-actions / Lint
(@typescript-eslint/no-unused-vars): 'response' is assigned a value but never used.
'response' is assigned a value but never used.
Raw output
2 | const requestUrl = new URL(githubAvatarUrl)
3 | requestUrl.searchParams.set('s', `1000`)
> 4 | const response = await fetch(requestUrl)
| ^
5 | return
6 | // console.log(response)
7 | }
github-actions / Lint
(no-useless-return): Unnecessary return statement.
Unnecessary return statement.
Raw output
3 | requestUrl.searchParams.set('s', `1000`)
4 | const response = await fetch(requestUrl)
> 5 | return
| ^
6 | // console.log(response)
7 | }
8 |
github-actions / Lint
(@typescript-eslint/no-unused-vars): 'Partials' is defined but never used.
'Partials' is defined but never used.
Raw output
1 | import { Client } from 'discord.js'
2 | import { GatewayIntentBits } from 'discord.js'
> 3 | import { Partials } from 'discord.js'
| ^
4 |
5 | export const getDiscordServerMembers = async () => {
6 | const API_TOKEN = process.env.NEXT_PUBLIC_DISCORD_API_TOKEN as string
github-actions / Lint
(@typescript-eslint/no-unused-vars): 'GUILD_ID' is assigned a value but never used.
'GUILD_ID' is assigned a value but never used.
Raw output
5 | export const getDiscordServerMembers = async () => {
6 | const API_TOKEN = process.env.NEXT_PUBLIC_DISCORD_API_TOKEN as string
> 7 | const GUILD_ID = process.env.NEXT_PUBLIC_DISCORD_GUILD_ID as string
| ^
8 |
9 | const client = new Client({ intents: [GatewayIntentBits.Guilds] })
10 |
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
10 |
11 | client.on('ready', () => {
> 12 | console.log(`Logged in as ${client.user.tag}!`)
| ^
13 | })
14 |
15 | client.login(API_TOKEN)
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
43 | client.login(API_TOKEN)
44 |
> 45 | console.log('\n')
| ^
46 | console.log('after client login')
47 | console.log('\n')
48 | }
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
44 |
45 | console.log('\n')
> 46 | console.log('after client login')
| ^
47 | console.log('\n')
48 | }
49 |
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
45 | console.log('\n')
46 | console.log('after client login')
> 47 | console.log('\n')
| ^
48 | }
49 |
github-actions / Lint
(@typescript-eslint/no-empty-function): Unexpected empty async arrow function.
Unexpected empty async arrow function.
Raw output
> 1 | export const getTelegramChannelMembers = async () => {}
| ^
2 |
github-actions / Lint
(@typescript-eslint/no-unused-vars): 'avatarUrl' is assigned a value but never used.
'avatarUrl' is assigned a value but never used.
Raw output
14 | const resultMembersData = await membersData.map((memberData) => {
15 | // console.log(memberData)
> 16 | const { avatarUrl, id: memberId } = memberData
| ^
17 |
18 | const memberWithOnbordingData = memberData
19 |
github-actions / Lint
(no-return-await): Redundant use of `await` on a return value.
Redundant use of `await` on a return value.
Raw output
45 | })
46 |
> 47 | return await resultMembersData
| ^
48 | }
49 |
Check failure on line 7 in app/entrypoints/renderer/src/app/api/get-discord-server-members/route.ts
github-actions / Lint
(@typescript-eslint/no-unused-vars): 'Events' is defined but never used.
'Events' is defined but never used.
Raw output
4 |
5 | import { Client } from 'discord.js'
> 6 | import { Events } from 'discord.js'
| ^
7 | import { GatewayIntentBits } from 'discord.js'
8 | import { Partials } from 'discord.js'
9 |
Check warning on line 21 in app/entrypoints/renderer/src/app/api/get-discord-server-members/route.ts
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
18 |
19 | client.once('ready', async () => {
> 20 | console.log(`Мы вошли как ${client.user?.tag}`)
| ^
21 |
22 | console.log(GUILD_ID)
23 | const guildId = Number(GUILD_ID)
Check warning on line 23 in app/entrypoints/renderer/src/app/api/get-discord-server-members/route.ts
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
20 | console.log(`Мы вошли как ${client.user?.tag}`)
21 |
> 22 | console.log(GUILD_ID)
| ^
23 | const guildId = Number(GUILD_ID)
24 |
25 | const guild = await client.guilds.fetch(guildId)
Check warning on line 27 in app/entrypoints/renderer/src/app/api/get-discord-server-members/route.ts
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
24 |
25 | const guild = await client.guilds.fetch(guildId)
> 26 | console.log(guild)
| ^
27 | if (guild) {
28 | const members = await guild.members.fetch()
29 | console.log(`На сервере ${guild.name} ${members.size} участников:`)
Check warning on line 30 in app/entrypoints/renderer/src/app/api/get-discord-server-members/route.ts
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
27 | if (guild) {
28 | const members = await guild.members.fetch()
> 29 | console.log(`На сервере ${guild.name} ${members.size} участников:`)
| ^
30 | members.forEach((member) => {
31 | console.log(`${member.user.tag}`)
32 | })
Check warning on line 32 in app/entrypoints/renderer/src/app/api/get-discord-server-members/route.ts
github-actions / Lint
(no-console): Unexpected console statement.
Unexpected console statement.
Raw output
29 | console.log(`На сервере ${guild.name} ${members.size} участников:`)
30 | members.forEach((member) => {
> 31 | console.log(`${member.user.tag}`)
| ^
32 | })
33 | }
34 |