#development
1 messages · Page 1397 of 1
lmao
its not that big of a deal
almost same thing
?
yes
????????????//

nice regex at the end @carmine summit
Huh?
????????????/ /
can ya help me
k
#development message if you're on node 14+
k
k
tf?

yes
that rly works? ok
Just realized I am running on node 6
and i cannot update it cuz missing perms
AHHHHHHHHHHHHHHHHHH
help
Do node -v
v12
That is the npm version
of
of
of
hof
Use let preferredGames = (response.preferredGames || [])[0] || 'None' then
@carmine summit allow me to explain
i'll allow you ofcourse
whats use of fs.existsSync ?
Checks if the path exists
let preferredGames = (response.preferredGames || [])[0] || 'None'
// (response.preferredGames || []) tells javascript to check if response.preferredGames exists and if it doesn't it returns an empty array
// [0] this just gets the first element of the array duh
// || 'None' if the first element of the array doesn't exist (we returned an empty array if the user has no preferred games) it returns 'None'
right
@pale vessel didn't you know I'm allergic to strings created with '?
yeah
I just copy pasted his code
WOT
and I use semicolons
templateStrings || doubleQuotes || process.exit
#noSemicolonClub
Nm
Nm
what will happens if i delete these files ?
Probably nothing happens
nothing
@earnest phoenix your node app fucks up
It will be regenerated
not all hosts have brains
@carmine summit @pale vessel what if i delte these files and my code stops working ?
what does a 5head mean? (flazepe reacted to my message with that emote)
NAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
manually regenerate
nah what
No
btw if you delete those files, all your packages gets updated
@earnest phoenix you mean reinstall my all packages ?
for package-lock.json at least
the other stuff idk how
My RAM when I close chrome with 15 tabs:
@earnest phoenix so can i delete those files except package-lock.json without getting code stop working
no no no no
@earnest phoenix can you got https://beautifier.io to clean up your code then come back and edit the message? unformatted code is hard to debug
we are not computers
we cant evaluate your code and pinpoint the error
that's not what this channel is for
debug your code
because we can't do meth
compute = calculate
😩
lol
It's not even funny
also this
we cant evaluate your code and pinpoint the error
that's not what this channel is for
debug your code
It's sad and depressing
honestly though
@earnest phoenix i found the error just by reading do i permission to tell him where the error is or do i let them figure it on their own
you know you're at the lowest point when you get happy when someone asks a question properly
wtf do you mean lowest point
up to you, code
return messafe.channel.send(`**${message.author.username}**, You do not have perms to unban someone`)
find the error here on this line
@earnest phoenix
It means that this channel is full of help vampires instead of people who are actually trying
society if discordjs.guide had their introduction page full of caps lock text screaming at people to learn programming before trying to make a bot
it's not even learn how to use your language
the guy who asked the question must be feeling like oh god what the fuck have i done
but rather people who don't and can't think logically trying to do programming, when programming demands logic problem solving skills
hey guys wanna test my new thing
(don't mind the participants tab it's broken)
haha
hello @quartz kindle how u doin g
him
is there any way i can make my bot send a reply into a channel the command was executed inside and allow the users to customize the prefix on discord.py
for custom prefixes you need a database
@quartz kindle do you know da wae?
@quartz kindle can you explain where the fuck this null is coming from? on the server-side code it says undefined instead of null
show your "has left the chat" code
@quartz kindle
socket.on("disconnect", () => {
participantsArray.splice(participantsArray.indexOf(name), 1);
io.emit("leave", name, participantsArray);
console.log(`${name} disconnected`);
});
name should be undefined since it's logging undefined disconnected in the console
which means the user never entered their name on the namePrompt event
does it happen every time you leave the tab or window or just by itts self
When you do namePrompt, have it set a name, something like "Anonymous" if they don't enter their name
you mean the one that detects io.emit("leave")?
socket.on("leave", (n, participantsArray) => {
let leaveMsg = document.createElement("p");
leaveMsg.innerHTML = `${n} has left the chat`;
document.querySelector("#messages").appendChild(leaveMsg);
updateParticipants(participantsArray);
});
so the undefined is probably being converted to null by socket.io itself
because json doesnt support undefined
but why does it execute more than once?
oh i get it now
socket.io-client's default reconnecting tries is set to Infinity by default
@quartz kindle I added this line in the disconnect code:
socket.on("disconnect", () => {
if (!name) return;
// ...
});
make a smol chat app
you made one before?
Can i get priviliged intents for my testbot, without it having the required amount of users?
Yes
If your bot is in less than 100 servers, you can have the intent without whitelisting
Enable the intent in developer portal
ok thanks!
do you guys mind if i use callback hell
because i just fixed the site and now it's callback hell
will i have to have client.run("TOKEN HERE") in every command i create for my bot?
no
ok thanks
just wondering incase i need to do it so the command works
and gets ran propperly
Client.run is used to login into the bot account with the token you provide - and you should login only once.
yes ik and i didnt know if i need it in every file for my py bot
Does anyone know php?
Is code913 here? If he's here, can I ask something?
Can I ask something?
Do you know JavaScript?
bruh
hello just wanna ask how to print the result into an embed? thank you!
What does Auction.aggregate([...]) return? Does it accept a callback?
ee any idea how to make a variable using d.js
Say what now
ee any idea how to make a variable using d.js
@lethal grail
well how do I modify the variable value in a command?
variable = "newVariable"
OH so you guys are discussing JavaScript? process.exit(500) // server cant handle freaks using a spaghetti language
@pale vessel no like, in an autorole command it will modify the variable value
^
it doesnt accept objects
also that 500 means the HTTP internal server error
IT EEZ WHAT IT EEZ

process.exit() fires an exit code lol
1 - Catchall for general errors
2 - Misuse of shell builtins (according to Bash documentation)
126 - Command invoked cannot execute
127 - “command not found”
128 - Invalid argument to exit
128+n - Fatal error signal “n”
130 - Script terminated by Control-C
255* - Exit status out of range
What's funny?
meh, alr. I've made a variable. how do I get the variable value? for example I have a configuration command and I want to get the value of the "autorole" variable.
im done with express
the routes and bla bla
that piss me off
@willow mirage if you're making a newapp.getpath for EVERY SINGLE FILE lemme tell you about this:
app.use(express.static(__dirname)); // automatically serves every single file
just type the variable name
@earnest phoenix ik
i already knew that
i just lazy to open new routers
and write codes to render pages
so like :
Autorole status: autorolevariable
var myAss = {
soft: true,
stinky: true
};
console.log(myAss);
imma stop programming for a while
oh god no please no
comeback to the real life
i want my ass to be available outside the current scope
play with ma friends and . . . (don't think dark 😉 )
Hey guys,
Is message.guild.owner deprecated ?
no

I'm getting a null return
its a getter
var myAss = {
soft: true,
stinky: true
};
console.log(myAss);
@earnest phoenix that's setting up the variable, how about getting the value in a command?
it returns null if not cached
oh
see the last line also PLEASE FOR GOD'S SAKE USE REPLIES NOT QUOTE
there are no client.user.owner or client.owner right?
there is client.user
typo
you can get owner via client.fetchApplication
I was using
message.guild.owner.user.username and it returns a typeerror
you need to fetch the owner if its not cached
see the last line also PLEASE FOR GOD'S SAKE USE REPLIES NOT QUOTE
@earnest phoenix well, I'm asking for the value to be displayed in the message not in the logs?
How ?
imma just do client.users.cache.get("MY ID")
you can get a user id in like 2 seconds
you need to get the value to log it duh
hm? > you need to get the value to log it duh
@earnest phoenix
by typing myAss you are getting the value of the variable and there is a console.log() around it which you pass the variable's value to
I love the Quote more then reply
because Quote is cool
but HOW will the value be sent as a message
fetch the value by typing the variable name => pass it to console.log function
discord.js
How can i know which invite link was used by the user?
Guild.fetchInvites()
no?
@willow mirage this is only a list of invites. How can i know in the guildMemberAdd event which invite of those was used for the joining user?
then say it
idk
._.
but I'm sure what cutie cat said is not how to do it
._.
I don't think you can
you can mate
but you can't do it mate
how do invite logging bots work then
^
even after discord changed the API stuff for privileged intents
@near stratus client.users.fetch(message.guild.ownerID)
Thank you very much 😊 😊
discord.js
After the guildMemberAdd event is fired with the member parameter, how can i find out which invite link this member used?
discord.py
Hello :)
Is there actually a way to determine which device someone use?
Like:
if user = mobile...
or
if user = desktop...
I know on d. js but not py rip
yea js i found too 😦
@solemn latch Thank you very much! on point!
Will i run into any api limits when i do a member.guild.fetchInvites() whenever a guild member joins the guild?
Hopefully not, but its hard to say.
Some communities have huge events where hundreds of users join in short periods of time.
I know of giveaway communities that had 2-3 people join per second on average for over 5 minutes.
Its certainly possible to hit a ratelimit.
why does this get an outline?
<div class="form-group">
<label class="form-control-label" for="basic-url" style="color:white">Command Prefix</label>
<form action="../guild" method="POST">
<input class="input-group-text" aria-describedby="basic-addon1" name="prefix" value="{{ serverprefix }}" type="text" style="color: white; background-color: #2F3136">
</div>```
is there a way to reply to users with the new reply feature in dpy?
see their github
which one?
specifically issues/PRs to see if it's in the works
why would you need to reply to users? just wondering
why does this line kinda thing show up?
just a fun bot
replies r pog
yeah pog
if messages gets deleted the reply context gets fucked up tho
not for bot or something
yea
I want the message ID to be searched on all channels, how can I do it?
module.exports = {
name:"userinfo",
usage: "userinfo",
description: "shows information about a user.",
execute: async (message, args, client) => {
const Embed = new Discord.MessageEmbed()
.setTitle(`User information`)
.setDescription(`Name:\n${message.author} \nDevice:\n${message.guild.members.cache.filter(m => m.user.presence.status === current).size, acc) {}) } \nCreation Date:\n${message.author.createdAt}`)
.setColor("RANDOM")
message.channel.send(Embed)
}
}```
don't see where the problem is
let msg;
message.guild.channels.cache.forEach(async channel => {
if(msg) return;
msg = await channel.messages.fetch(args[2] || message.id).catch(() => undefined);
reactionRoleManager.createReactionRole({
message: msg,
role,
emoji
});
});
I wrote this code but I'm getting an error
Error?
Unkown message
Then write it.
hey guys!
hi
let res = await afetch("https://nycpokemap.com/raids.php?time=" + new Date().valueOf())
let data = await res.json();
const getName = id => nameList.filter(el => el.i === id)[0].n;
let raids = data.raids.filter(raid => getName(raid.pokemon_id).toLowerCase() === options.name.toLowerCase() && raid.level >= (options.level ? options.level : 5))
console.log(raid.pokemon_id + options.name)
const reactionEmoji1 = message.guild.emojis.cache.find(emoji => emoji.name === 'valor');
const reactionEmoji2 = message.guild.emojis.cache.find(emoji => emoji.name === 'mystic');
const reactionEmoji3 = message.guild.emojis.cache.find(emoji => emoji.name === 'instinct');
if (timer !== null)
{``` still at this problem! Cannot read toLowerCase of undefined
No file ready ؟
@sudden geyser how are you doing today?
const Discord = require('discord.js');
const yt = require('ytdl-core');
const client = new Discord.Client();
client.on('guildMemberAdd', member => {
const voiceChannel = member.voiceChannel;
if (!voiceChannel) {
return;
}
voiceChannel.join()
.then(connnection => {
let stream = yt('https://www.youtube.com/watch?v=uKF3nWssCoE', {audioonly: true});
const dispatcher = connnection.playStream(stream);
});
})
client.on('guildMemberAdd', member => {
member.addRole(member.guild.roles.find('name', '--1'));
})
client.login("token")
That is v11 code
v11 is depreciated.
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
client.user.setGame(` Coloring Team`,'https://www.twitch.tv/zya2d_')
client.user.setStatus('ldle');
});
var prefix = "#";
client.on("message", message => {
if (message.content.startsWith(prefix + "obc")) {
if (!message.member.hasPermission("ADMINISTRATOR")) return;
let args = message.content.split(" ").slice(1);
var argresult = args.join(' ');
message.guild.members.filter(m => m.presence.status !== 'offline').forEach(m => {
m.send(`${argresult}\n ${m}`);
})
message.channel.send(`\`${message.guild.members.filter(m => m.presence.status !== 'online').size}\` : عدد الاعضاء المستلمين`);
message.delete();
};
});
client.login("Token");```
@earnest phoenix why are you sending your same code twice
@eternal osprey it’s not the same
Anyone know why I cannot install Discordjs-commando?
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/commando.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent ```
@livid lichen type git --version into your command prompt to see if you have git installed on your system/path
how did you try to install commando?
and your git version is v6? there is no git v6
npm install discord.js/commando
git is on v2
I think it's supposed to be discord.js-commando
discord.js-commando is outdated
I have Discord v12.
show the output of git --version
included, verify that the path is correct and try again.
At line:1 char:1
+ git version
+ ~~~
+ CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException```
Oh?
No clue.
probably confused with git with npm
install it?
Why?
ask djs maintainers
Lmao
afaik the npm version of commando is for djs v11
Thanks for the help so far, it's downloading,
At least it's not deprecated (yet, maybe)
it should tbh
Klasa is also gone
lmao rip
So you need to self maintain it 😩
@quartz kindle I downloaded it and it is all installed. Should I restart Studio?
Or my entire computer.
what drama 🍿
i dont feel like maintaining a discord lib otherwise i'd make one myself

Oh.
If it still fails, try closing vscode then installing.
It should be added to your path
Another one of Ao's actions was to ban Kyra over "breaking copyright", and filing an unofficial DMCA takedown request to Kyra's work-in-progress framework.
He tried lol
@abstract spire
so they forked klasa into sapphire
but gave up on the whole custom lib part and went with discord.js
what a pitty
hey
how do i set the server and player count of servers where the bot is in, as status?
Take a look at the top.gg api for that https://top.gg/api/docs
oh wait no
you want it inside your status
my bot's status yeah
yeah i have seen that
but how do i set the server amount in the status
isn't explained there
https://discord.js.org/#/docs/main/stable/class/GuildManager
through https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=guilds
guildmanager has a .cache property, with which you can do .size to get your server count
hmm so something like: js client.guilds.cache.size
should guilds be defined?
guilds is defined through the GuildManager of client, so i don't think you'd need to
just test it out
well that is at least what i get from the docs, do you get anything on client.guilds itself?
ohh wait
use size() instead of only size
no clue then 
Show your code
from discord.ext import commands
client = commands.Bot(command_prefix = "!", case_insensitive=True)
@client.event
async def onready():
print("Im ready and online!")
@client.command()
async def Help(ctx):
await ctx.send("test")```
doesnr send the word test
kinda annoying
just says Ignoring exception in command None: discord.ext.commands.errors.CommandNotFound: Command "Help" is not found
Idk man
Is that all
You already set case_insensitive to true
Are you sure you aren't overwriting client
Sure
ctr and z
Ctrl Shift Z
ty
ctr z does the trick to
it closed VSC
it shouldnt
const n = require("../n.json");
const Discord = require("discord.js");
const human = require('humanize');
exports.run = (client, message, args) => {
if (message.author.bot) return;
if (!message.guild) return;
if (!message.member.hasPermission("BAN_MEMBERS") || message.author.id !== n.oID) {
message.channel.send("You are missing the permission(s): Ban Members.");
} else {``` cannot read property hasPermission of null?
You sure Visual Studio Code doesn't save a log of persistent file changes.
eh nah, would expect you to save the file.
message.member is undefined.
huh wait how
dm gets filtered out from if (!message.guild) return;
this is my code, and if you write wrong alias for the language, it gives and error message to me and stops the bot completely, any idea how to make it return an message in the channel the command got executed in and continue on as normal?
@prisma oriole it is not
You could log the value of message to see if member holds a guild member sometimes, or never.
Anyone have an idea how I can fix my code?
@loud ingot you can also just wait until all the others have been helped.
I can wait, I was just wondering.
yeah that's okay.
You're discarding the value of result when it's resolved the promise (.then(result => {}))
Though I don't know why it would warrant a crash since I don't have most of your code. Just by looking at it the most it looks like are a few mistypings. Are you using the translate function correctly? Is there any special condition for it?
Does anyone know why this isn't working please
// Welcome Message
client.on('guildMemberAdd', member => {
const guild = member.guild;
const channel = member.guild.channels.cache.find(channel => channel.name === "welcome");
if (!channel) return;
const Embed = new Discord.MessageEmbed()
.setColor('#0a6af5')
.setTitle(`Welcome to Server ${guild.server}`)
.setAuthor('member.user', 'member.avatar')
.setDescription('Server description')
.addFields({ name: 'New member', value: 'member.user' }, { name: 'Account Created', value: 'account.created' }, { name: 'New Total Members', value: `${total.guild.members}` }, )
.setFooter('ICE BOT' | './images/ice-bot');
channel.send(Embed);
});
I am using it correctly yes. And no, I don't think there is any special condition.
@steel agate Any errors?
If not then you most likely don't have the guild members intent
Go to your bot page in developer portal
okok
where would it be please
Don't know if you have to specifically enable your Intents on discordjs too like in Javacord
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
You don't need to yet
Open your bot application
Go to "Bot" section
Scroll down
yep
right ye there both on
hmm strange
ill try again
console.log right at first line to see if it's your mechanic issue
ok thanks
now it says total is not defined
client.on('guildMemberAdd', member => {
const guild = member.guild;
const channel = member.guild.channels.cache.find(channel => channel.name === "welcome");
if (!channel) return;
const Embed = new Discord.MessageEmbed()
.setColor('#0a6af5')
.setTitle(`Welcome to Server ${guild.server}`)
.setAuthor('member.user', 'member.avatar')
.setDescription('Server description')
.addFields({ name: 'New member', value: 'member.user' }, { name: 'Account Created', value: 'account.created' }, { name: 'New Total Members', value: `${total.guild.members}` }, )
.setFooter('ICE BOT' | './images/ice-bot');
message.channel.send(Embed);
});
Hello , I just DSL Bot to my servers now how to send voting link in my server ??
Well, it isn't defined so
It should be guild.memberCount
total.guild.members sounds like a pseudocode
How to setup channel who votes and when for my server? Using webhook
@languid dragon Hello , I just DSL Bot to my servers now how to send voting link in my server ??
Nice
@pale vessel HELP PLS
you still need help?
Yes me need help
@molten yarrow how to setup webhook for who vote when for my server .how much vote ..
Yeah
put your whole embed and send into result cb
you dont have result outside of your cb :3
now its saying message is not defined
client.on('guildMemberAdd', member => {
const guild = member.guild;
const channel = member.guild.channels.cache.find(channel => channel.name === "welcome");
if (!channel) return;
const Embed = new Discord.MessageEmbed()
.setColor('#ae0e00')
.setTitle(`Welcome to`)
.setAuthor('member.user', 'member.avatar')
.setDescription('Server description')
.addFields({ name: 'New member', value: 'member.user' }, { name: 'Account Created', value: 'account.created' }, { name: 'New Total Members' }, )
.setFooter('ICE BOT' | './images/ice-bot');
message.channel.send(Embed);
});
use code blocks when u post code, its easier to read @steel agate
wdym
im a little confused
Anybody help ?
between here xD
message.channel.send() what message?
It's a guildMemberAdd event
you cant use message.channel.send inside your event
There's no message lol
ah 😦
Hoggers ?
@molten yarrow thank you so much! Your help was a lifesaver. I really appreciate it!
u welcome :3
@steel agate you just do channel.send(Embed) not message.channel
@loud ingot you also see if your definition is grey, its not used
Ah, i'll remember that. Thanks!
@stark abyss hey
I need help setting up webhook . To know who voted my server and when ..
I asked alot of times here bt no response
Sure thing
if you need help feel free to ping me again but you should read the docs and try first
Sure .
I think he means he wants a css background on his top gg bot website
Just add a style tag to your bot description. If you are using markdown for the description, I'm pretty sure you'll have to switch over to html in order to be able to use css
Not really, you can also add style if you have existing markdown
how i put an embed in message.channel.send
like: message.channel.send({embed: ...})
;-;
@frail yarrow
Define MessageEmbed, insert the things you want inside it, and then use the embed variable to use it inside send
practice?
message.channel.send({
embed: {
color: '#000000'
description: 'okay'
}
})``` u mean something like this @frail yarrow
from discord.ext import commands
import asyncio
client = commands.Bot(command_prefix = "!", case_insensitive=True)
@client.event
async def on_ready():
print("Ready")
return await client.change_presence(activity=discord.CustomActivity(name="Do !help to get commands", emoji=None,))
@client.command()
async def ping(ctx):
await ctx.send("Pong!")``` Doesnt show the custom activity but the streaming one works fine?
Bots can't have custom statuses
$hi
but it says in the docs
that's wrong then
discord.py covers all parts of the API, yes. However, that doesn't mean all of them are prone to work on specific accounts.
Friendships are supported by discord.py, but those are available to users only.
hmmm but if it cant have custom activitys why is it in the docs?
it's not for bots
oh
Users can have custom statuses, bots can't
huh ok
also is there anyway i can change my bots #2024?
nope
ik
mmmk so mee6 is special 
how?
dw
ok....
anyway thanks
self bot moment
mee6 doesn't have custom status??
Asking for codes generally isn't allowed here
And specifically in cases with bot makers, you'll have even less help
no but ok
as those are not tolerated/supported here
yeah
Yeah he means bot maker for discord
Which is really easy any way lmao
The have an literal doc build inside the fucking app lmao
Bot Designer For Discord
o ok
umm i recommend honestly coding it
like you can make stuff so easily and you can be like: "I made this!"
Just some people can’t code or are just 
i mean honestly coding isnt even that hard
Ikr
i started coding what like 3-5 months ago
i am already a python wizard
tho i started with dpy
It only took me 5 hours and a lot of errors to install discord.py but apart from that it’s really easy
i dint know any python
how many servers are required to verify my bot?
I only know print(“”) lol
i wanted to start coding a lot earlier but i couldnt figure out how to install python (PATH thingy) so i just kept giving yp
?

are you serious?
It’s not @hollow sedge
For some people who are
the it is
I AM SERIOUS MAN!
oh wow we've got a genius over here
Yes 👍
Bot stuff
I haven’t done just one thing
python is one of the easiest language
^
^
what?
guys
how are you agreeing with that
Yes
u guys have atom?
What
imma share a teletype link here, lets all make a bot together lmao
ok
I don't have atom
Time to destroy the bot 
then ur not invited :Shrug:
No not yet atleast
When?
this
like the bot is the driving force for me learning python you know
Yeah I was talking about my bot @hollow sedge lmao
bruh
Very
but u can do a lot with it
discord.py is so easy to use
i thought css was complicated, but honestly its just python style tags lmao
@stark abyss you find html hard?
html style tags*
try making something else before you say coding is easy
idk
Have you done anything else apart from a bot?
Hmmm?
yes
Like?
but i dont have to justify that because I'm not the one saying that it's easy
And that’s where I say bullshit and also say “try making something else before you say coding is easy”
alright i dont understand what you're saying
try making something else before you say coding is easy
it's obvious this isnt going anywhere anyway
yep let it be
Yup
let me look at your bot dm invite link
^
ReferenceError: Cannot access 'CommandFiles' before initialization ```
No matter where I put my line of code, it always says this.
u defined CommandFiles after that line of code
put it before and remember to save
verify as in discord verification?
yep
get my bot verified
like this bot
it needs to be in 100+ servers i assume
jum
i'll ask to discord support
@earnest phoenix 75+ servers but fake servers won't count
it will dm you if you can apply for verification
i have a side navbar
how does this happen?
it like glows kinda
dont know how lmoa
just manually change it
@drifting wedge wdym? it's so easy /s
i dont know how
like i dont know what css is making it do it?
likt its kinda of a glow
Can we do webhook in discord mobile ?🙁
lemme take another pic
what do you mean?
probably box-shadow
Is there any possible way to do this in mobilee !
@stark abyss
why would you do that in mobile?
Bot name ?
thanks tho
np
@stark abyss
thanks
one bot i know is Fuku Kaichou#8631
there are probably others
and lmao i wasn't aware you were thinking for your server i thought it was your bot
Nope .i was looking for server .not for bot @stark abyss
Can u tell me some more bots .to do this?
No bot found in name "fuku kaichou"
;-;
Hi guys I have a problem with a code in discord.py
||@client.command(pass_context=True) async def meme(ctx): embed = discord.Embed(title="", description="")
async with aiohttp.ClientSession() as cs:
async with cs.get('https://www.reddit.com/r/dankmemes/new.json?sort=hot') as r:
res = await r.json()
embed.set_image(url=res['data']['children'] [random.randint(0, 25)]['data']['url'])
await ctx.send(embed=emb||ed)
how do i hyperlink embed
@shadow crag (text)[link]
ok thank
ah fuck i did it wrong way lmao
i think its the other way around h
haha, its fine
i messed up when coding that as well
happens.

yes
send me the code without the error? I would really appreciate it
or author iirc

Does any bot that anyone knows of, have a way to - Take a DM and send it to a server channel? Example: I want to set up a suggestion bot, where people can DM the bot suggestions for my product, and the bot will then send that message to a channel in my discord that only my admins can read?
Ez
Filter messages by DM, then use .content to get the message
@daring sonnet ^
I have no idea what that means.
I am looking for a bot that does this. I am not interested in making my own at this time
client.on('message', message =>{
if(message.content.startsWith('!suggest') && message.channel.type === 'dm'){
message.reply('suggestion sent!') // be sure the command works
const suggestion = new Discord.MessageEmbed() // create an embed
.setAuthor(message.author.username,message.author.displayAvatarURL({dynamic : true /* nitro profile picture too*/}))
.setDescription(message.content.split(' ').slice(1).join(' ')) // the message content without the command
client.channels.cache.get('channel id').send(suggestion) // send the embed
}
})
``` @daring sonnet

Tsk

though, they are referring to an actual bot that has that feature, because they are not experienced with coding
why would you just write the whole thing

you legit just exit
What do you want to do.
debug what though. Why not just run the app?
I'm still confused. Do you want to run your program or something? You should create a script for running your app called start, where the value will be node .
Aka json { "start": "node .", "test": "..." }
but I just told you what you need
Yes
does anyone know why the Message object in my case does not have a delete method? in discord.js documentation this method is described
node <filename>
.js on end?
node . should work, they specify the main file in their package.json
you can not indicate it
like that
that's considering their main file is called index.js
message.reply(...) returns a Promise. You need to resolve it via async/await or .then/.catch.
oh he already has that
when i try to delete it it is already a message
Yes, but it's still wrapped behind a promise.
So you still need to use async/await
oh okay
You may want to start by learning the language and Node.js first
tf
xLyniix do you understand what npm is and how to use it.
Okay, now do you understand JavaScript as a language?
if (resultbypass != (None,)) or (resultbypass is not None) :
Can anyone help me ? I got an error because it goes inside of the if, but when I print it, it is (None,)
I don't know how to fix this
python language
@leaden lake you don't need the parenthesis around your expressions in the if condition.
What is resultbypass equal to?
Hmm, but when you print it inside the if condition, resultbypass is still (None,)? Could you possibly rephrase your question? I'm a bit confused on, "because it goes inside of the if"
not sure about python, but im pretty sure you cannot compare tuples directly like that
I think you can
if you do () == () will it return true?
yes
@leaden lake I think the issue is the or operator. resultbypass fails the first check, but passes the second one as a tuple is not equal to None.
I tried if not None in resultbypass :
||t'est fr||
||yep||
Is it possible to put data in a specific position when using the method updateMany in mongoose
wait it's not possible ^
Then you may want to remove the user ID check in your filter.
You should also await message.react(...) so there's no chance the bot's reaction is counted first.
yeah
hey is anyone here familiar with heroku?
what's the problem @eternal osprey
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/belangerijk.git'
this is the problem
it is killing me
i need help, my code stucks at collection.insert_one() and not advance
no errors
@earnest phoenix sorry i don't know. Couldn't you wait with your question as someone already was first?
yes sorry
no need to be aggressive :-:
i just want to this work i am very sorry
why are you pushing from heroku anyway @eternal osprey
what is mint @earnest phoenix
so in my bingo bot command is &startBingo 10 y, 10 is mint minutes from now when will bingo start and y is yes (to loop)
i dont understand what you are saying
where is mint defined?
and how are there no errors?
Hello
I need some help
raise ClientConnectorCertificateError(
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1124)')]
I got this error
no errors i checked
and my code doesnt advance
so "made database" does not print?
did you realise that from my post
wait what? you shouldnt have to do that
I'm going to give more context
So, I'm using python. Discord.py and all. I made a code that just does a basic command, just wanted to see if I can get the bot up and running.
so the error was bson.errors.InvalidDocument: cannot encode object: <discord.ext.commands.context.Context object at 0x000002C8AFDFFF70>, of type: <class 'discord.ext.commands.context.Context'>
the error was causing "ctx": ctx, thanks
how to get channel id from ctx i cant find on google
I figured it out
whenever i try to run the function inside of the for loop it only gets the last value of the array. i want it to use all the values inside of the array
setInterval(() => {
var array = ['719362069975138354', '331222209299349504']
for (var i = 0; i < array.length; i++) {
var userID = array[i]
const tdvApi = require('tradingview-scraper');
const tv = new tdvApi.TradingViewAPI();
tv.getTicker("aapl").then((resp) => {
console.log(userID);
}).catch(err => {console.log(err)})}
}, 5000);
});```
in message.mentions.users.first(), how would you get he second mention
const userArray = message.mentions.users.array();
console.log(userArray[1]);
im pretty sure that would get the second mention
if it gets the first one change the 1 to 2
id
@errant perch I'm not entirely sure, but I think this is due to JavaScript saving the values by references rather than values. Instead of using .then/.catch, could you try using async/await instead?
ok i'll try that out
If anyone's free I have a few questions, I'm coding a bot using Python.
First time.
Feel free to explain your issues here
It's not an issue, I just want to clear some stuff up
Can my bot use CSV to store and read data
A CSV file
Yes, but why not use a database (SQLite, Postgres, etc.)?
First time
I'm not sure what those are
The purpose of my bot is to make a Character profile and show/edit the amount of capital the character holds
Firstly what do you know about python?
I know the syntax and I've done Eulars project
I'm not sure if I've done a lot but I've done a good number of them
Do you know about defines and variables
Variables?
Variables are like
variablename = "string output"
Yeah
You can use input aswell
If the data should be persistent and across a number of users, a database like SQLite, Postgres, etc. makes more sense for your situation. If you have knowledge on SQL, it shouldn't be the hardest thing in the world, but it can take time.
You can search "SQLite Python" on Google and probably find help resources.
Np, I recommend you use SQLite if you're new though.
@frank crescent if you want useful resources for python you should join the python discord 
@frank crescent you can start with csv files if you want
and then move on to an actual db
@frank crescent it has resources for the python coding language and its a non toxic discord
But I will look into SQlite too
Once I get tha hang of it I'll implement it
@earnest phoenix hit me up with an invite
Just google python discord
Oh okay
It's partnered with discord as well 
When learning Python, I recommend three sites:
- The Python Tutorial (glossary tutorial)
- Realpython (articles, long)
- Hyperskill (courses, recommended for beginners)
Hyperskill, in my opinion, is the best for beginners, but it's moving towards a subscription model by the end of the year. Though, if you sign up early, you can get some additional months added for free.
Or use pycharm edu Community courses
They also have Java & Kotlin courses.
Crewmate Hyperskill uses that educational stuff
I know
But ima save these thingies
For some reason pycharm edu has rust lessons
@sudden geyser was it called SQLite
Yeah
that's the name of a database
@frank crescent what ide do you use
IDE?
A text editor that's designed for a specific coding language
I use Visual studio code
Like pycharm community and edu is directed at python
@frank crescent what os do you use (windows mac linux and ect)
Linux is a operating system
I need a laptop to put Linux on
Oh
Ubuntu has guides for installing python
I meant installing it from a windows machine 
R is a programming language


