waseeeen
waseeeen
DIAdiscord.js - Imagine a bot
Created by night of death on 11/16/2023 in #djs-questions
problem with creating a bot in code
Intents should be replaced with IntentsBitField
10 replies
DIAdiscord.js - Imagine a bot
Created by Solo on 11/14/2023 in #djs-questions
Random
the logic between
if(interaction.commandName === "hi") {
if(interaction.commandName === "hi") {
and
interaction.reply({ content: rnd })
interaction.reply({ content: rnd })
is not discord related at all
19 replies
DIAdiscord.js - Imagine a bot
Created by Solo on 11/14/2023 in #djs-questions
Random
discord bot is the way to input and output data to and from your program. same as when you create CLI application, you provide some input to command line, YOUR program does some magic with that input and answers to you
19 replies
DIAdiscord.js - Imagine a bot
Created by Solo on 11/14/2023 in #djs-questions
Random
quick answer: interaction.reply( anyhtingYouWantToSendAsResponseToThatCommand). the way you will get random answers is not d.js related
19 replies
DIAdiscord.js - Imagine a bot
Created by Solo on 11/14/2023 in #djs-questions
Random
what is IT? do you have trouble with making slash command or making random answers or anyhting else?
19 replies
DIAdiscord.js - Imagine a bot
Created by Solo on 11/14/2023 in #djs-questions
Random
so what's your problem? where are you stuck?
19 replies
DIAdiscord.js - Imagine a bot
Created by Araraura on 11/2/2023 in #djs-questions
Reply to the original command on a second message
Probably no. You can use ephemeral messages as reply to an interaction, but if it already replied with ehemeral: true, you can't reply to interaction again with non-ephemeral. If you need to show which user used command, you can mention the user in the message, in the embed description, or in the embed fields values
4 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
@Qjuh tyvm, looks like I need to learn more about js objects 🤓
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
I've already forgotten and not commited the way I tried
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
and as uses wasn't there I thought that they are not exist in fetched invites
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
the thing is, I couldn't access uses previously, so I decided to console.log(JSON.stringify(invFetch))
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
oh, there it is
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
import { Guild, Invite, Routes } from 'discord.js';
import { client, rest } from '../client';

export const fetchInvites = async (guild: Guild): Promise<void> => {
const inv = (await rest.get(Routes.guildInvites(guild.id))) as Invite[];
const invRest = await rest.get(Routes.guildInvites(guild.id));
const invFetch = await guild.invites.fetch();
console.log('==invites REST==');
console.log(invRest);
console.log('==end invites REST==');
console.log('==invites Fetch==');
console.log(invFetch);
console.log('==end invites Fetch==');
client.invites = inv;

console.log('Invites cached');
};
import { Guild, Invite, Routes } from 'discord.js';
import { client, rest } from '../client';

export const fetchInvites = async (guild: Guild): Promise<void> => {
const inv = (await rest.get(Routes.guildInvites(guild.id))) as Invite[];
const invRest = await rest.get(Routes.guildInvites(guild.id));
const invFetch = await guild.invites.fetch();
console.log('==invites REST==');
console.log(invRest);
console.log('==end invites REST==');
console.log('==invites Fetch==');
console.log(invFetch);
console.log('==end invites Fetch==');
client.invites = inv;

console.log('Invites cached');
};
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
got it
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
import { Guild, Invite, Routes } from 'discord.js';
import { client, rest } from '../client';

export const fetchInvites = async (guild: Guild): Promise<void> => {
const inv = (await rest.get(Routes.guildInvites(guild.id))) as Invite[];
const invRest = await rest.get(Routes.guildInvites(guild.id));
const invFetch = await guild.invites.fetch();
console.log('==invites REST==\n' + invRest + '\n==end invites REST==');
console.log('==invites Fetch==\n' + invFetch + '\n==end invites Fetch==');
client.invites = inv;

console.log('Invites cached');
};
import { Guild, Invite, Routes } from 'discord.js';
import { client, rest } from '../client';

export const fetchInvites = async (guild: Guild): Promise<void> => {
const inv = (await rest.get(Routes.guildInvites(guild.id))) as Invite[];
const invRest = await rest.get(Routes.guildInvites(guild.id));
const invFetch = await guild.invites.fetch();
console.log('==invites REST==\n' + invRest + '\n==end invites REST==');
console.log('==invites Fetch==\n' + invFetch + '\n==end invites Fetch==');
client.invites = inv;

console.log('Invites cached');
};
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
if I log it without stringifying it appears in console as [object Object]
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
zero difference between client.rest and REST()
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
same
34 replies
DIAdiscord.js - Imagine a bot
Created by waseeeen on 10/20/2023 in #djs-questions
Can't get 'uses' property on fetched invites
rest defined in client/index.ts as
export const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);
export const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);
34 replies