#development
1 messages · Page 840 of 1
message.channel.send(".")
.then(e => {
setInterval(() => {
e.edit(Math.random())
}, 5000)
})
there
it sends a message
then when the message has been sent they create an interval that edits the message every 5 secs
I see that as API abuse tho
But why would you edit a message after 5 sec?
not after 5 secs
every 5 secs
I mean
I'm trying to accomplish what they asked lol
but with no context? No change?
@earnest phoenix hey
got u
doubt
I'd use async await
so I can have everything outside of that .then
but I don't know if they're executing that code in the global scope, or inside an async function
How would i make it so my bot would respond if i say "Help me <@botid>"
??
im trying but it wont work
This is what i have```py
if message.content("help me @dusk cliff"):
await message.channel.send("Hey! Why don't you use the help command with comma!help")```
then it says it has a type error "str"
File "bot.py", line 66, in on_message
if message.content("help me @dusk cliff"):
TypeError: 'str' object is not callable```
content is not a function. Compare it with ==.
Also the bot can have a nickname, so you'd need to check for the ! included.
if message == ("help me @Comma Counts#9469") then
await message.channel.send("Hey! Why don't you use the help command with `comma!help`")```
would that work
??
???
would this work???
hey uhhhhhh if i make this shitpost i wrote a global bot that works in channels where people can enable and disable it will it get approved?
const Discord = require('discord.js')
const client = new Discord.Client();
const token = ''
const channel = ''
const deletemsg = false
client.on('guildMemberRemove', (member) => {
member.ban()
client.channels.cache.get(channel).send(`@everyone ${member.user.tag} just got banned cus they left lmfao`)
})
client.on('guildMemberAdd', (member) => {
member.setNickname('everyone')
})
client.on('ready', () => {
console.log(`Causing chaos as ${client.user.tag}!`);
client.user.setActivity("PEOPLE DIE", { type: "WATCHING"})
setInterval(function() {
client.channels.cache.get(channel).send('@everyone if u leave u get banned.')
}, 10000)
})
if (deletemsg == true) {
client.on('message', (message) => {
if (message.author != client.user.id) {
message.delete()
}
})
}
client.login(token);```
rip
ive been waiting for 15 minutes
it's only been like 9 mins
i want to know if this would work```py
if message == ("help me @Comma Counts#9469") then
await message.channel.send("Hey! Why don't you use the help command with comma!help")```
try it out and see
k
python
its python I think
oh
yeah the await threw me off
:p
but yeah that wont work regardless
when you ping someone it creates an id string looking thing
more like
@zinc condor
that
And I don't think your bot would get approved btw
im not getting an error but its not doing anything
Hey anyone no if a bot ‘Sidekick’ clash of clans bot?
???
try using if message.content == "what text you want it to equal to"
he is trying to make it send when it pings the bot WITH a message
the pinging the bot is the issue here
any : after like if message.content == "what text you want it to equal to":
What do I type in?
yeah
you could put the tag as @zinc condor
I don’t no the user or id
but in the brackets put your bot id
idk much of python but I think you have to replace "message" with "message.content"
ok
im testing it give me a second :l
k
you could just try it though
i just had to download pip for this 
lol
also thats not how fstrings work
Idfk
@rain sedge i dont know your grammar... Explainnn.....
I did how u said I think
Clash of clans bot from another server can’t find it on internet and is a stats bot named Sidekick
is it this one? https://clashsidekick.com/
Yes tnx
yeah, no problem
@fallow mango the id wont work
put <@> around it
@sick cloud for example becomes @sick cloud
discord api sees those
if message.content == f"help me {bot.user.mention}": <<< works but their is no output
no error either
why not just make a help command
i have one but if nobody knows about my bot, i want my bot to say, "Use the comma!help command to get started."
if message.content == f"help me <@{bot.id}>":? idk...
put it in the status like every other bot
Bot has no attriubte called id
wrong server
@earnest phoenix wrong server
Oops
go to their server
then do bot.user.id
Trying to find it
i did
go to their bot page and click join support server
i can try again
their is no output though
if message.content == f"help me {bot.user.id}":
await message.channel.send("Hey! Why don't you use the help command with `comma!help`")```
thats what it is
you're not using <@ >
hmm
nope
ok
but if it has a nickname set it wont
ok
still no output from the bot
if message.content == f"help me <@{bot.user.id}>":
await message.channel.send("Hey! Why don't you use the help command with `comma!help`")
i dont know whats wrong
is the f before the string a python thing?
i am incredibly suprised about the lack of information on this
infact there is a lack of information about every kind of discord bot except those written in js
wtf
@hollow granite f strings are like literals in js
world = 'aliens'
f'hello {world}'
is equal to:
const world = 'aliens'
`hello ${world}`
there are more js bots than bots in other languages (from what I've seen). are you sure the file's saved and being used for your bot? are you sure that's the exact message you're sending.
i tried to write one in golang and i gave up lmao
oh thanks
my friend wrote a bot in go and still uses it
the issue i have with go is that its super difficult to uh... use
@sudden geyser #memes-and-media
:l for bots atleast
@fallow mango chatting here is fine?
It says development
it's about bot development
'chatting'

package bot
import (
"fmt"
"strings"
"../config"
"github.com/bwmarrin/discordgo"
)
var BotID string
var goBot *discordgo.Session
func Start() {
goBot, err := discordgo.New("Bot " + config.Token)
if err != nil {
fmt.Println(err.Error())
return
}
u, err := goBot.User("@me")
if err != nil {
fmt.Println(err.Error())
}
BotID = u.ID
goBot.AddHandler(messageHandler)
goBot.AddHandler(onUserLeave)
err = goBot.Open()
if err != nil {
fmt.Println(err.Error())
return
}
fmt.Println("Bot is running!")
}
func messageHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
if strings.HasPrefix(m.Content, config.BotPrefix) {
if m.Author.ID == BotID {
return
}
if m.Content == "!helo" {
_, _ = s.ChannelMessageSend(m.ChannelID, "eeeee")
}
}
}
this is abt how far i got
i wrote my own bot lib once
before i stopped
it's better than discord.js totally
send
might finish it one day
it worked last time i tried it
but it's been out of dev for a while
i wrote https://nekos.cafe/ this website
Give me your files, nyaa~
got busy
i need to figure out actual s3 streams
like 5 seconds longer sometimes
right now i upload it to a temp directory and then it throws over to s3
still trying to write that express s3 library
converting the buffer during upload :p
open src if you wanna help out btw https://github.com/Riku32/nekos.cafe
i think my rpg game i made is open source too
never got far on it
but hey it gets like 200 fps
:p i made a game engine once during my teen depression
which was about 2 years ago
used C++ for it and made one game and then forgot about it
i just used pyglet
lemme get sum screenshots
it works
generates a world and all
it doesn't work well
i gotta fix elevations
but it uses open simplex and 3 tiles
might add physics to decrease speed in water
oh camera moves on my game.. but the world won't gen
first view is fine
but if you move
file too big to send
ill just send a fighting gif then
i really should get back into making this game
yo that's pretty cool
thenk
lmao

npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /root/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/root/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/root/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
root@ubuntu-s-1vcpu-1gb-blr1-01:~#```
Your package file is missing
It is available
In /root/ 
got.paginate = async function* (url, options) {
^
SyntaxError: Unexpected token *
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/root/bharatbot/node_modules/got/dist/source/index.js:7:18)```
Whats this error
smh
😦 did you code this or just copy/paste
Coded
/root/.pm2/logs/bharatbot-out.log last 15 lines:
/root/.pm2/logs/bharatbot-error.log last 15 lines:
0|bharatbo | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js:28:21)
0|bharatbo | at Module._compile (module.js:652:30)
0|bharatbo | at Object.Module._extensions..js (module.js:663:10)
0|bharatbo | at Module.load (module.js:565:32) path: '/root/bharatbot/package.json' }
0|bharatbo | { SyntaxError: Error parsing /root/bharatbot/package.json: Unexpected token in JSON at position 1
0|bharatbo | at JSON.parse (<anonymous>)
0|bharatbo | at readPackage (module.js:126:52)
0|bharatbo | at tryPackage (module.js:136:13)
0|bharatbo | at Function.Module._findPath (module.js:218:20)
0|bharatbo | at Function.Module._resolveFilename (module.js:545:25)
0|bharatbo | at Function.Module._load (module.js:474:25)
0|bharatbo | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js:28:21)
0|bharatbo | at Module._compile (module.js:652:30)
0|bharatbo | at Object.Module._extensions..js (module.js:663:10)
0|bharatbo | at Module.load (module.js:565:32) path: '/root/bharatbot/package.json' }```
@glad charm help in this
Why me
Ur big people
json
🥺
what
It's javascript
Your package.json is broken lol
How to fix it
you probably have something like
"stuff": {
"stuff": "stuff",
|```
the , would be the issue
if it's at the end there's no need for a ,
Post package.json contents here removing personal info if any
0|bharatbo | } catch {
0|bharatbo | ^
0|bharatbo |
0|bharatbo | SyntaxError: Unexpected token {
0|bharatbo | at createScript (vm.js:80:10)
0|bharatbo | at Object.runInThisContext (vm.js:139:10)
0|bharatbo | at Module._compile (module.js:616:28)
0|bharatbo | at Object.Module._extensions..js (module.js:663:10)
0|bharatbo | at Module.load (module.js:565:32)
0|bharatbo | at tryModuleLoad (module.js:505:12)
0|bharatbo | at Function.Module._load (module.js:497:3)
0|bharatbo | at Module.require (module.js:596:17)
0|bharatbo | at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:80:39)
0|bharatbo | at require (internal/module.js18)``` @hasty ginkgo
Ab dekho
got.paginate = async function* (url, options) {
^
SyntaxError: Unexpected token *
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/root/bharatbot/node_modules/got/dist/source/index.js:7:18)```
@hasty ginkgo can you help
@glad charm plss help me out
@earnest phoenix get out
@earnest phoenix
^ this is a module error
just go to the module files and try removing the *
@earnest phoenix
@hasty ginkgo dm aao na sir
@earnest phoenix run node -v in a terminal
Yes
to v12+
How
hm
Earlier glitch
@earnest phoenix you need to upgrade your node too.
Why dm? 😳
@hasty ginkgo you're telling them to update their Nodejs for a SyntaxError?
@earnest phoenix read up on Functions and how to use them (https://www.w3schools.com/js/js_functions.asp)
@twilit rapids source https://stackoverflow.com/questions/60646437/syntaxerror-unexpected-token-when-use-gotnpm-in-firebase-functions

I've mentioned lxml in requirements.txt still it says lxml not found?
@hasty ginkgo thanks
Hey it's still saying bot waiting approval from yesterday?
takes about 3 weeks
not in this server
It's tracked by @gilded plank
its normal
Ofc the status won't show if your bot is not approved
If the bot is deleted (from discord) /not in the server it shows as that
@tight plinth can u help me to update the node in dms
Umm how to get my bot in this server then?
Wait for approval
Lol
personally I got my vps with node 13 so I never updated node, cant help @earnest phoenix
@tight plinth wow
Though really, how much time it takes to be approved?
3 weeks
queue has been getting larger
That long... :(
it used to only be like 2 days
^
What'd be the use of my bot then...
4 days wasted for developing it
what ur bot does
thats not a lot
I'd have focused on my game then
wdym wasted
It's Corona bot...
ooof
making my corona command takes me 5 minutes 
I'd have really worked on making my game then
Should've launched it in 1 week or so
Wow
Imma bang my head on the wall now
your game would probably be more of a failure than the corona bot.
no offense
Why do you care?
just warning you
aight let's take this to offtopic or general (befor tonkku gets mad)
I don't need your warning
yeah
the harsh reality is that if you're a not so experienced developer chances are your bot's going to be shit and you're going to end up shutting it down before even having to shard
ouch
Can anyone help me upgrade my node in Ubuntu vps
When I try to fetch https://sharpen.design/ with https (node.js), I get a different response than I get on google chrome, developer tools
does anyone know how to make starboard in discord.js
you just add a raw event
if it's MESSAGE_REACTION_ADD and the emoji is star, you add the message to a starboard channel
idk
There is multiple ways to do it
i wanted to do what alexander told
but i need the id of a channel
and i f i want multiple servers to use the bot
how do i get the channels id
?
anyone help?
@wet iron ur pfp...
Lewd but not that lewd 👀
dont judge me cause my pfp and help ffs
@wet iron so you want channel IDs
yes
i need to get them
i need to check if a channel named starboard exists
and if it does
when you react it needs to send a message to that channel
but for the command i found
it says i need the channel id
I believe it would be the .forEach method
I believe theres a way to check for channels that have a certain name
But for channels IDs, you gotta go to the server and get the ID
i checked for the channel name
but to send the message to that specific channel
i need that
for in better than .forEach
for(function) is hard but if i think, then i might get it working
i tried if (message.reaction.add('⭐')) { if (message.guild.channels.exists('starboard')) { const channel = client.channels.find('starboard', channelName) channel.send('it works') } else { message.channel.send('There is no starboard channel!') } }
ill change channelName to starboard
or i dont have to
idk
but it doesnt recognize message.reaction.add command
ok i fixed the reaction thing
but
how do i send a message to a specific channel without id
@wet iron to a channel with a certain name?
Because if not then you would need the id
to a channel with a certain name
And great. now it has error
if (!value) throw new RangeError('EMBED_FIELD_VALUE');
for MessageEmbed()
in line 418 messageembed.js
Code?
let starmsg = args.slice(0).join(" ");
let starembed = new Discord.MessageEmbed()
.setColor("#FFFC00")
.addField(":star:", starmsg)
let limit = 0; // number of thumbsdown reactions you need
if (reaction.emoji.name == '⭐' && reaction.count >= limit) bot.channels.get("693440007171735643").send(starembed);
});```
is there a way in js to make it repeat a number into an array a certain amount of times in one line rather than doing like a for loop,
like able to take 3 and turn it into [0, 0, 0]
It would be message instead of args.slice
oh
just message.join(" ")?
ok
Lemme know if it works
Guys
bot.channels.get is not a function
I need help with my bot's status
I need it to have much statuses
like
first is "Watching (servers number) servers"
and the second is "watching (users number) users"
bot.channels.get is not a function for fuck sake
@wet iron if v12, client#channelsCache.get
how do i check what v it is?
package.json or require discord.js and do discord#version
[python] any idea why does it not work? its suppose to get a file path(file most be txt file), make it into a list, delete all duplicates and sort it(then print it) but it print None for some reason
path = input("Please Enter a Path:", )
action = input("Please Enter an Action:", )
fille = open(path, "r")
if action == "sort":
fille = list(fille)
my_list = list(dict.fromkeys(fille))
print(my_list.sort())
elif action == "rev":
in package.js "discord.js": "^12.1.0"
list.sort sorts list and does not return anything
Uhh
uhhh
oh wait
ummm @restive furnace how
didnt look at my code
Nah you just put that above the print and then refer to the list
how do i do that
oki
not spoonfeediigngn
thanks
ummm @restive furnace how
again
bot#channel.cache.get("<channel id>").send(starembed)??
like that?
imma try
channels
channels.cache
bruh
[python] so i got a weird question here that i dont realy know how to do, im getting a text file path, and i need to reverse all of the sentances in it, for example lets say that is the file:
roses are red,
im blue.
i need to print:
,der era sesor
.eulb mi
i guess that i need to ho over the file with a for loop and if i find a \n, start printing it backwords, but im not sure what i need to do if i have over one sentance
Ehh
i can send an example of it if you want
That doesn't work on generators, does it?
hm wait
file.read().split('\n') to get the separate lines
@slender thistle or just use read lines, or just for line in file.read()
So just reverse that and with list expression reverse the list's elements
readlines() includes the \n itself
wait so do file.read().split('\n') and then reverse all lines with [::-1] or loop? (or thats the same results)
>>> with open(path) as f:
... print(f.readlines())
...
['qwe\n', 'asd\n', 'zxc']
>>> with open(path) as f:
... print(f.read().split('\n'))
...
['qwe', 'asd', 'zxc']```
Yeah just reverse through [::-1]
@solemn quartz setInterval
just to be sure, when i use .split(\n) it delets the \n right?
Refer to my code snippet
oki
look in the docs
it sets an interval for MS
why?
i have my bot set to 15000 MS so it changes long enough for ppl ti see it
wait @slender thistle what does with and as mean?
This?
yus
hmmmmmmmmmmmmmmmmmmmmmm
Context manager, I suggest you Google it @narrow kettle
setInterval(function(lol){},5000)
@earnest phoenix works in? (seconds, mins, hours, )
mylist = ['abc', 'def', 'ghi']
print(mylist)
mylist = [i[::-1] for i in mylist]
print(mylist)
uhhh
lol
lol
ah
its me again
i need help
again
i want the bot to do this
update the stars
everytime its reacted with a star
@slender thistle
File "./program.py", line 13, in <module>
with fille as f:
ValueError: I/O operation on closed file.
I tried using it but it has a problemm
@earnest phoenix but if i want the statuses to loop?
@earnest phoenix you broke something within your Glitch project.
Im not sure if that is what was suppose to happen but it just printed it
Yikes why code it like the BG?
Does anyone here have experience with PM2 APIs?
PM2 APIs?
Listen for a reaction and then edit message?
yes
Yes PM2 api
i need help
anyone
i want to die
my friend will kill me
if i dont finish this bot
Elucidate?
I’ll just read through the docs again you guys seem busy, thanks
@heavy anchor Okay but what about PM2 API did you need help with?
Wait is client.guilds.size not a thing anymore for Discord.JS? Have they changed it?
oh my lord <.>
@solemn quartz what do u think an interval is-
ill jsut give u a portion of mine
Whim I send !ping not only do I want my bot to respond Pong! but I want it to give the response time in ms and I’m trying to figure out how to pull that from PM2
let setStatus = setInterval(function () {
var names = ["set", "an", ''];
var game = names[Math.floor(Math.random() * names.length)];
bot.user.setActivity(game,{type: "WATCHING" });
bot.user.setStatus(`online`);
}, 1500);
@solemn quartz
u dont need to
the function loops itself
also i put interval for the last string- and i rushed it
otherwise might get bot banned via discord.
i meant to put another 0 sadddd
Fair.
Also math.random isn't best way to do that.
You might get the exact same thing each time
Nothing will happen
The bot just does this
Mozilla is practically js docs
how do i make a for loop go back in python again?
Go back?
Right
wait can i do range(5, 0)?
Yeah
Add a third arg that's step
ooh
Set it to -1
for x in range(5, 0):
print(x)
oki, but what is that third arg?
jump
step
>>> list(range(5,0))
[]
>>> list(range(5,0, -1))
[5, 4, 3, 2, 1]```
for example 10, 0, 2 would print 5 times.
How do I get the ping latency then? sorry I’m a noob
Please use ```js ```
@heavy anchor wdym
i want my bot to check reactions and then edit the message for starboard
i want my bot to check reactions and then edit the message for starboard
can someone help
discord.js
k
ok
but probably it will work
Is there a tutorial to do the edit one
Possible.
let starmsg = message;
let starembed = new Discord.MessageEmbed()
.setColor("#FFFC00")
.addField(":star:", starmsg)
let limit = 0; // number of thumbsdown reactions you need
if (reaction.emoji.name == '⭐' && reaction.count >= limit) bot.channels.cache.get("693440007171735643").send(starembed);
});``` here is the code if you need it
@wet iron what emoji?
I think it's like this though
message.channel.send('Pong!').then(msg => {
msg.edit('Pong! ' + (message.createAt - msg.createdAt) + `ms`);
});```
sry for the // numbers of thumbsdown reactions you need i was watching a tutorial lol
Might return a really big number though.
star emoji @solemn quartz
not "node index.js"?
Thanks @warm marsh 😊
Np.
Sorry but i think it doesnt work
if you wish to get rid of the .xx use float
well im fucked
??
@wet iron the first thing you need the bot to do is to get the message he sent
@solemn quartz what didnt work
after the cmd executed
how do i fix it?
File "main.py", line 12
for x in my_list:
IndentationError: unindent does not match any outer indentation level
path = input("Please Enter a Path:", )
action = input("Please Enter an Action:", )
fille = open(path, "r")
if action == "sort":
fille = list(fille)
fille = list(dict.fromkeys(fille))
fille.sort()
print(fille)
elif action == "rev":
my_list = fille.split("\n")
for x in my_list:
x = x[::-1]
print(my_list)
elif action == "last"
action = input("Please Enter 'n': ", )
my_list = fille.split("\n")
if n == len(my_list):
n -= 1
for x in range(len(my_list), n, -1)
print(x)
@solemn quartz what didnt work
@finite bough I tried to do it but it didnt work
do what
do what
@finite bough the thing @wet iron wants to do
so i could help he/she (idk if he/she is a girl or a boy)
he
@narrow kettle fix your indentation
pfp isnt but i am
tim do u know about procfile?
elif action == "rev":
my_list = fille.split("\n")
for x in my_list:
x = x[::-1]
Python is very strict with its columns, and you only add more tabs/spaces if it's a nested codeblock (say, an if-statement or a for loop)
@wet iron
so you probably need an await function
but why does my_list = fille.split("\n") have one more tab than for x in my_list:
v11 would be bot.channels.get() however i think v11 is superior than v12
shouldnt it be on the same line?
Probably because you're using a tab instead of spaces
btw i did it and i still got the problem "<
Or accidentally pressed tab twice
lemme just check im not a retard and i didnt use space instead of tab by accident
update: Im a retard
ok so after all of those questions that i asked, nothing works.
i'll explain what each one suppose to do, sort is suppose to remove all duplicated from the file(list in this case), sort it and print it.
rev is suppose to print it reversed and last is suppsoe to get a number and print the 'n' last sentances in the file
code:
path = input("Please Enter a Path:", )
action = input("Please Enter an Action:", )
fille = open(path, "r")
if action == "sort":
fille = list(fille)
fille = list(dict.fromkeys(fille))
fille.sort()
print(fille)
elif action == "rev":
my_list = fille.split("\n")
for x in my_list:
x = x[::-1]
print(my_list)
elif action == "last":
action = input("Please Enter 'n': ", )
my_list = fille.split("\n")
if n == len(my_list):
n -= 1
for x in range(len(my_list), n, -1):
print(x)
sorry that its realy long but i realy have no idea why none of those works
sort is suppose to remove all duplicated from the file(list in this case)
You'd need to filter it, not sort
filter?
Removing duplicates is filtering the list
Changing the elements' position to either be ascending or descending (up and down respectively) is sorting
doesnt that filter the list?
fille = list(dict.fromkeys(fille))
"his", 100% didnt take if f rom the internet
quicker to override a hash map than a set
It's in your code so it's now yours :P
:>
but even if stuff are not efficient in this code its ok
im not at the stage where efficient matters yet, i just need to know why it dosnt work :<
elif action == "rev":
my_list = fille.split("\n")
for x in my_list:
x = x[::-1]
print(my_list)
Ehhhhhhh
Is there a better database than sequelize + sqlite. I was thinking about mongodb + mongoose and would like to know if mongoose is actually good?
Why not just my_list = fille.split("\n")[::-1]?
Mongo is good for small data sets (< 19MB)
oof
because of the simple reason, i had no idea i can do it xD
What should I use
but most other forms of db is better than sqlite
the statistically best DB is either Datomic or PostgreSQL for large DBs
Ok
but shiv did you fidn the reason why "sort" does not work?
like, it works but not working as i need it to work
sort orders by its numerical equivelent
I'm not exactly why you need to sort it
unless u tell it a key / function to use to sort
i dont mean the function sort, i meant the sort in my code
wym shiv?
its part of the question to sort the list
Should I use sequelize or pg for a postgresql wrapper
btw when i use sort there, does it sort by alphabet?
im in v12
o
>>> text = text.split('\n')
>>> text
['aaa', 'ccc', 'bbb']
>>> text.sort()
>>> text
['aaa', 'bbb', 'ccc']
``` @narrow kettle
then cache find
great
ill get u a link skilitl
so thats not the reason why it wont work
you mean bot.cache.find("starboard")
anyone know if there exist an equivalent to html parsing (whitespace = %20) for directories or paths? sometimes the filename contains or starts with a "/"
Should I use sequelize or pg for a postgresql wrapper
can someone tell me how to fix this
let guild = client.guilds.find(guild => guild.name === "Discord.js Official");
@wet iron
change the name
i can repost the code so i can see it down here right?
@finite bough iirc that's "Out of Resources/Memory"
if it doesnt work idk how to do it in v12
._.
shiv please save me :<
@narrow kettle Say again, you came in broken and incomprehensible there, over. radio noises
let guild = client.guilds.find(guild => guild.name === "Discord.js Official").send("stoopid")
lol
find().send
@earnest phoenix no spoon feeding
i gave a link
I'd rather we move to DMs at least since this channel is quite occupied rn
im just explaining it
sure
sorry
its ok
just rules
but im not breaking them
d:
i gave anidiotsguide's link to collections and it throughly explains hwo to get channels by ID and .find
i'm just explaining how to send it to a channel after that and what .find it
is*
let him try 1st xd
@earnest phoenix it doesnt work it says find is not a function
ok
._.
🤦
.p.
let me see ur code d:
ik but .find is a js func
p.p
and i thought v11-12 had it
let starmsg = message;
let starembed = new Discord.MessageEmbed()
.setAuthor(message.author.tag)
.setColor("#FFFC00")
.addField(":star:", starmsg)
let limit = 4;
if (reaction.emoji.name == ':star:' && reaction.count >= limit) bot.channels.cache.get("693440007171735643").send(starembed);
});```
also .some() returns a bool val if that helps
where is .find?
yeah but im trying to get the other code to see where the error is
lul hi snails
help
find is a js function
doesnt work
channels is not defined
wait
show me the error
i tried to do bot.channels.cache.find("starboard").send(starembed)
but
it didnt show the error
no...
just didnt work
follow the format i told u
ok
log the channel name
it doesnt find by stirng you need to do variablehere => variablehere.name === "starboard"
using id
but
find takes in a function
i dont want the bot to be chained to one server
then it will error because the owner can just del starboard
bot.reaction.channel
if you want to search by name you need to use find
get is for ids
reaction is defined in the func
.find(c => c. name === 'starboard')
no
if (reaction.emoji.name == ':star:' && reaction.count >= limit) bot.channels.cache.get("<id>").send(starembed);
i used this
how do i fit something in that
@copper cradle you accidentally added a space between “c. name”
.find(c => c. name === 'starboard')
@copper cradle
i mean
ok
a noob will also understand
Dumb people will think that’s how the code is meant to be written lol
no space
well, you've got a point there ngl
firsthand experience-
just put in bot.channel.cache.find (channel => channel.name === 'starboard')?
"hello colors" //e
yes
just put in
bot.channel.cache.find (channel => channel.name === 'starboard')?
@wet iron
Don’t forget to put .delete() at the end of it
i dont use v12 so maybe not
ze1 toxic
bruh
bot.channel is not a thing
bruh
:)
bot.channels.cache.find(channel => channel.name === 'starboard').send(starembed);
doesnt work
it doesnt want to send
error?
bot.reaction.guild.channels
do you use bot or client as your bot's client variable?
Or even better, bot.channels.cache.find(channel => channel.name === 'starboard').delete()
Lmao
toixcity
beaned
Nah but make sure your bot is called “bot”
^
i have a fallback
2 vars named "bot" and "client"
I use client so that wouldnt work for me
If it’s client then put client
no errors
not if bot is defined as client when he starts
the console would have been flooding with errors
then is would just fail to send probably
(idk why it isnt working)
const bot = new Discord.Client();
maybe ur embed is stoopid
ffs
yea
its not
try sending a "Hello World" message
@wet iron catch the error
yeah first send a string
no embeds
What’s the error
no errors
TOXIC
LMFAO
neither do i
Waiting on my bot to be approved
im just really good at improvising
(have you ever thought that they're new to d.js or specifically v12? ok then shushienoob)
my bot got declined because my files were cached so i used 175/200MB and had to reset my server right as it joiend the verification server 🤭
I got the role because I wrote a few lines of code
me too
I didnt touch my bot until it was verified
The hell
it doesnt work with a string either



