#development
1 messages · Page 1402 of 1
yes
is java still a preferred language for some applications?
yes
yes but imo it's slowly decreasing
guys, i wanna use Android Studio but with JavaScript, is it possible?
like the only thing I can name Java with is Android and they've got Kotlin now
yeah that's what I thought
the only thing java is useful for is minecraft modding /s
all my homies use kotlin
what about react?
Error: EACCES: permission denied, open './../../remind.json' error found```
I have made a json file and I am trying to input some data in it
@boreal iron what about a switch
Dumb question, is js oop?
if(accounts[userID] == undefined){
accounts [userID] = {
reminder: 'History opinion paper',
time: Date.now()+millisecs
}
fs.writeFile ('./../../remind.json', JSON.stringify (accounts, null, 4), err => {
message.channel.send("Account created... ")
if(err) return console.log(err + " error found")
})
}```
are u using discord.js?
Yes
Are you using JSON as a database?
Sort of but ONLY for me
Would have been more lines to write and makes sense only if you have a lot more params
json cannot work as a database ._.
yeah it's just bad
use a DB to make it work
At least use quick.db
You know what it's okay guys
Literally anything other than JSON will do
never used it myself
oh
lmao I am aware
nope
it has oop traits but not as oop as languages like java
@solemn leaf that code is just an example how it works, you’re good to add, edit whatever you like
some libraries do follow OOP principles but js itself in nature isnt oop
what parts of OOP in java are not in JS?
too many to list
alright lol
are js and java similar?
didn't you just ask that?
Hey
it actually can btw, I am using it
is that normal ?
@commands.command()
async def dbl(self, ctx):
url = "https://top.gg/api/bots/721506633074737233"
headers = {"Authorization": self.bot.dbltoken}
r = requests.get(url, headers=headers)
print(r.content)
embed = discord.Embed(title="Top.gg stats", description=f"Votes this month:\n{r['monthlyPoints']}Certified Bot:\n{r['certifiedBot']}")
await ctx.send(embed=embed)``` its printing what looks like to be my bots description and this error:
```TypeError: 'Response' object is not subscriptable```
@boreal iron updated the code a few times, make sure u got the latest version
the main difference is that in js objects are completely mutable, you can change the properties, values, anything - on the go because js objects are internally just fancy dictionaries/maps
isnt that python too? @earnest phoenix
i don't think so
which is what makes js so fun
what i sent was python
🤔 ok
typescript 
thanks for explaining
@boreal iron if title is null cant you just do if (!title?
@cerulean ingot I think you'll want to use r.json() to convert it to json
ew
Null !== false
every time i try ts i just spend most of the time fighting against ts itself rather than actually coding
What makes java oop-er than js?
The user could for example enter -t:false or -t:0
if (!title) return;
Which would cause an error
i think this @pure lion
object immutability, proper types, everything is focused around classes
while js is the total opposite
See what I wrote above... (!title) will lead to issues
so that means JS is better?
lmao
nope
no? I think it just means they are both good at different things
"x language is better" isn't a general term, one language isn't better than the other when you look at them as a whole, every language has its use where it excels at
I did
js is designed to have a low learning curve and to boost productivity by simplifying a lot of concepts that are better defined in other languages
@boreal iron for the title or dis how does it work like how do you amrk it
Wut?
what's the best thing you guys have coded
my bot i guess lol
My game engine in C
Probably not my RTC app that doesn't wanna work
i made c# and java communicate in minecraft
some mobile app, but I'm nowhere near done
I messed up a function somewhere so the rays don't draw correctly sometimes but it works and that's what matters
what do you mean by communicate
@pure lion https://github.com/alebot-dev/ray-caster-game-engine awesome
C:
c# is aware of what changes in java
java is aware of what changes in c#
@boreal iron so like t:a
😮
Seems cool but i still don't understand lol
What’s about t:a? Didn’t get what u mean sorry
i have an unfinished project for a userland map implementation
using sharedarraybuffer in node

oh lol
That makes my code obsolete
for the announcement there has to be thou
Damn didn’t think about that is needed
I am learning react native stuff to make an app [no clue what's it gonna be]
Well then that requires to split different
im sick and tired of web dev in general lul
I find react native fun because it's more visual stuff
@pure lion ew no
please i have actual ptsd from asm
mov me to the bin```
i dont wanna go any lower level than c++
@solemn leaf nothing i can do now on mobile, let’s continue tomorrow
i already hate c++
I am going to learn asm
I know its good
because im really bad at it
Nobody can stop me
i dont get the point of writing asm because compilers are always going to be better than you
Nasm is my friend
but my teacher is making me do it regardless
😮
well, knowing asm is good for debugging and reverse engineering i guess
if you wanna be a cracker
what is asm
on compiled apps
assembly
nice
node unreal engine port when
i tried reversing a delphi program and failed miserably
Nowver
i've heard rust is great for easy UI so i'm giving it a try this week
there are a fuckton frameworks
I should learn rust
rust is the nodejs of c/c++
Then why learn rust when you can learn qt
What's deno then 
I don't think Rust is that popular for building uis
deno is go in js
It's supposed to be anyway, there are very few keywords
how du i make mai bot's page look liek https://top.gg/bot/655390915325591629
how do you english
Use css
Inspect element and find elements by their ID
I believe el botum thingy is .container
In the long description
the min 300 character desc?
Yeah
const { MessageEmbed } = require('discord.js')
module.exports = {
config: {
name: "add"
},
run: async(bot, message, args) => {
if(!message.channel.name.includes('s-ticket'))return;
if(!(args[0])) return message.channel.send("Not a valid user!")
let Channel1 = bot.db.get(`channelid_${message.author.id}`)
let channel2 = message.guild.channels.cache.get(Channel1)
channel2.overwritePermissions(args[0], {
VIEW_CHANNEL: true,
SEND_MESSAGES: true
});
message.channel.send("User has been added.")
}
}```
at TextChannel.overwritePermissions (E:\clientbots\ZeroBot\node_modules\discord.js\src\structures\GuildChannel.js:208:9)
at Object.run (E:\clientbots\ZeroBot\src\commands\tickets\add.js:12:18)```
number 12 is the channel2.overwrite
fixed^
can someone help me with this error?
at Object.readdirSync (fs.js:1021:3)
at requireAll (/Users/lorenzo/Desktop/Modbot-2.0/node_modules/require-all/index.js:32:18)
at CommandoRegistry.registerCommandsIn (/Users/lorenzo/Desktop/Modbot-2.0/node_modules/discord.js-commando/src/registry.js:190:37)
at Object.<anonymous> (/Users/lorenzo/Desktop/Modbot-2.0/index.js:78:4)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/Users/lorenzo/Desktop/Modbot-2.0/commands'
}```
Clearly there's no folder called commands in the Modbot-2.0 folder
bruh

command:
.setTitle('Ticket Deletion')
.setDescription('Are you sure you would like to delete this ticket?')
.setColor('75188c')
).then(embedd => {
embedd.react("✅")
embedd.react("❌")
bot.db.set(`${message.guild.id}-close`, embedd.id);
})```
index:
```let closeid = bot.db.get(`${reaction.message.guild.id}-close`);
closeid.delete()```
error: ```UnhandledPromiseRejectionWarning: TypeError: closeid.delete is not a function```
how would i get that to delete the embed?
Fetch the message through the message id
i didnt even think of that ty
Hey
how do i make it float and turn like this
ı need gelp
dont ask to ask
and the logo for dbl is turning
Ertassla
@cerulean ingot css and html
generate your css animations there
paste them into the style tag
how can like when i update the switch thing, and it register
i show an element
saying like: oh yay the thingy updated
it would be js right?
Yes
Onclick="togglemodule(this)"
Then have like
Def togglemodule(self) {
fetch("patch","/togglemodule", JSON={"name":self.id}) bx g bxstjcde
Yeah idk
ty tho
@earnest phoenix
Oh woops wrong one
This is the correct one
It needs to be on a channel
Hmmm?
like... channel. or message.channel.
An actual channel object you've selected, which is the one you want to type in.
if that's what your message variable is defined as... sure.
discord.js's startTyping function cannot do that
uh
they chose to implement it in a very weird way
so it works as a return?
ow
you're better off using client.api directly
await message.client.api.channels(message.channel.id).typing.post()
yuh
if i have a box
how can i space out text in the box
like so it works for all resolutions?
like how do i move stuff, but it works for all like resolutions?
html
ping
f l e x b o x
obviously you still need breakpoints for some stuff but flexboxes make responsive design not a pain
I have a question for discord.py:
What would I use for manage channel permissions has_permissions(????, manage_Channenls???? Channel_edit????)
can someone help with this error code?
Error: Cannot find module './src/structures/ProtoTypes
All this is saying is that the file ./src/structures/ProtoTypes doesn't exist. Beyond that, we can't say.
j
Hehe gonna solve your puzzle this evening don’t worry
I have to resubmit my bot for approval because at the time of verifying my bot I accidentally had a 1 in my code that was not supposed to be there
all I feel is pain
lol damn
why can't we delete applications?
oh we can
I am super blind
2 years I have been under the impression we can't
hi guys i have a problem, i recently added an embed but when someone send any message i have an error on the console but the bot still work
you're missing curly braces so js understands it as ```
if(condition) create embed
send embed //but embed doesn't exist here it's in the if
also please get a linter
In flask, how can I submit a form but not submit all the forms
Rn when I click submit
Itmsubmits all the forms in the page
Not just the ones in the tag
is data[“user”] a user id or an object on the vote event
ID
ID in a string
hmm
ahh it’s an id in a string that
how to make nice help page?
Yup
Is there a way to check if a message is replied? if yes, can i get the content of the replied message?
Yes and yes
How & How?
Replied messages have the message_reference property which has the messageID, channelID, and guildID. They also have the referenced_message property that has the referenced message object
Not sure if it exists inside libraries yet
But raw API responses have these
Ok Thanks!
👍
for some reason its not letting me download quick.db
Error?
long one
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (D:\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "D:\\node.exe" "D:\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd C:\Users\ronbr\OneDrive\שולחן העבודה\warn bot\node_modules\better-sqlite3
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.1 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.1.1 build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ronbr\AppData\Roaming\npm-cache\_logs\2020-11-23T06_32_45_358Z-debug.log
npm WARN warn-bot@1.0.0 No description
npm WARN warn-bot@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.1 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ronbr\AppData\Roaming\npm-cache\_logs\2020-11-23T06_32_45_687Z-debug.log
PS C:\Users\ronbr\OneDrive\שולחן העבודה\warn bot>
^^^
seems like the issue at “better-sqlite3@7.1.1”
@tardy hornet you need windows build tools
how develop bot?
i already have quick.db on my of my bots
but i cant download it to my second one
What language lad
english
on my pc, same one
@tardy hornet strange, try reinstalling build tools anyway
is it
@lyric pumice coding language tho? You clearly don't know 🐅
@tardy hornet no, there's a guide at discord.gg/plexidev
okay what now?
Follow the guide
i did
...
@lyric pumice #502193464054644737
If you have literally 0 clue what a programming language is, then don't get into bot development
Start with programming in general
ok
Though if you're just doing it for that badge -> https://content.hopefuls.de/developerbadge
You seem to be confused about the Verified Developer Badge. It is no longer a thing and cannot be obtained anymore. Please refer to the official Discord Developers Discord Server at https://discord.gg/discord-developers
How do I pull my bot username and tag into console in Python?
And the 4 digit tag?
user.discriminator
Or just
if you want name#tag, just print bot.user directly
__str__ method of it gets called and that returns name#discriminator
Oh, you were doing "{0.user}".format(bot)
I mean, if your Python version is above 3.6, use f-strings
I no longer have to find a new way to host my bot, the one dependency I needed finally installed
f"{bot.user}"
yes
Alrighty
format string in python, tbh
f-strings are literally called that
And how do I do a welcome message?
Uh.
on_member_join
Server staff set up ID of the channel where they want welcome messages to be.
You later:
- retrieve that ID (most likely from a database or cache, maybe even both);
- get channel with that ID;
- possibly create an embed or a message including member name/mention;
- send message.
hmm
It’s for my private bot
Ah, less hassle then 
Then how do I trigger it in code?
You simply set it up to do something and discord.py will call the event whenever it receives an event from Discord
It's an event for a reason. You don't call it manually, but instead add a listener for it and then let discord.py call it whenever a respective action happened
can someone help me making of {prefix} + vote command
on javascript
I want users to be able to vote with commands
yeah
You cannot vote on users behalf
I did not mean that
I mean users of the bot, should be able to vote with a simple command
with cooldown ofc
Vote for what?
Read what i said
...
you really don't understand me
there is like many bots doing that
without going to the website
whatever
That's what you're telling me tho 
I mean
imagine the "vote" button of your bot on top.gg is equal to your !vote command
That is tracking
Draxaya is referring to voting for the user
That The Bot votes for the user
Devs submitting their avatar discord bots
Hi, is it possible in js to get the parameters of a function ? Like for example i have this (stupid) function ```js
function sub(str){message.channel.send(str.substr(0,1900)}
I cannot change that function so is there a way to get a list of the parameters of this function ? It doesn't matter if typoef `["str"]` ^^
Thanks for anyone who respond
@past needle arguments is an array in functions
like sub.arguments ?
just arguments
the contents of the array depends on the function
using it outside a function scope throws an error that arguments is not defined
i still don't get how i can get the parameter(s) :-:
parameters and arguments mean the same thing
javascript only has one variable named arguments tho
arguments[int] gets the value of the indexed argument passed when calling the function
You can also do
// strs is an array of all the args
};```
something("String 1", "String 2", "String 3", ...);
^ The method above also works for passing arrays, while arguments doesn't
no, i'm trying to have an event command handler guildBanAdd, guildCreate and i need to get the parameters of the function exported
function logArgs(firstArg, secondArg, thirdArg) {
console.log(arguments);
}
logArgs("this is the value of the first argument", "this is rhe value of the second argument", "this is the value pf the third argument");
Outside of the function??
and that works?
oh you mean the parameter names not values???
idk how
... gang though
no i want to get the name of the parameters
qvq
function something(first,second){
console.log(first + ' - ' + second)
}
// the names of the param are "first" & "second"
Why would you ever want to do that
You can turn the function to a string and then use some regex to find all the parameter names
Use dynamic: true as an option
In d.js at least...
@earnest phoenix https://discord.js.org/#/docs/main/stable/typedef/ImageURLOptions
Do format: png and dynamic: true
discord v12 works like this yea?
client.channels.cache.get("CHANNEL_ID").send(Sembed);
yes
18:00 GMT that's midnight here
FAAAAAACCKKKKQQQQQQ TAIMZUNES
XD
How can I restrict a command to people who have voted for my bot in Python
When people vote for it, use webhooks and store the IDs of users in a database.
Then you can check in the DB if user voted in each command.
Is there another way?
@hasty mulch yes
Maybe to escape the DB thing, you could store user IDs directly in a variable?
just send a request to the dbl api to check if a user has voted
no need to store in a database
also #topgg-api
possible yes, ideal maybe not
@quartz kindle NO YOU CANT JUST LEAVE H GANG
Tim.hackAccount()
Tim.setUsername("Him")
didnt everyone leave already?
Hello
hi! If you want to ask a question just ask directly no need to ask to ask 🙂
Can anyone help me? How can I get my bot avatar round and animate it on the bot page.
Use CSS to set a border-radius and whatever attribute to animate it.
I have no idea about css so I ask here 😂
i tried using
message.channel.send("@ **#6226")
but it didn't mention the user
i also want to mention some other users along
like if i want to mention all my alts from this command
mentioning all my alts
isnt it easier to give them a role instead?
nah that will not work
i want to do something else
just take it as alt handler
<@userID>
yeah thanks but got it 👍
Can anyone help me? How can I get my bot avatar round and animate it on the bot page.
lots of css
LOL
Help me, I'm dumb!
Are you actually dumb, as in, lacking the mental fortitude to code, or are you just lacking the experience and knowledge to understand the code?
Because if you're actually just dumb, the only help we can provide in terms of bot coding is "don't code bots, use those that exist".
if you're just lacking experience, then there's a solution and it's "just take the time to learn javascript and you'll be fine".
Most people that say or think they're dumb, it's just because they're rushing into thinks head first and being overwhelmed by a lot of information all at once. Anyone would be!
not that I know
any1 help me split up text inside a box
like i have a div thing with a certain height and width
how can i like separate the text equally
?
"separate" how?
1 sec
between what and what?
sounds like a job for CSS flexbox
lemme try
Where ı can show my bots?
I asked a thing?
style="peepeepoopoo"
that's... still CSS
"Show"? What do you mean, "show"?
Bruh
there ya go 😉
a
@umbral zealot flex box is display: flex?
I mean for bots where ı need to put it
That's one of many CSS properties related to flexbox
you need to learn the entire system
.statcard {
background-color: #1c2024;
border-radius: 7px;
height: 60px;
length: 550px;
padding: 40px;
margin-bottom: 30px;
border: 0px;
box-shadow: 0px;
vertical-align: middle;
display : flex;
align-items : center;
justify-content: center;
}``` this is the css thing rn
and it's not easy
ex dee
Where can ı verify my bot
To take the bot creator tag
You mean "Bot Developer"?
you mean the "bot developer" role in this server?
Yea yea
^
Alr thx
then you wait
Wt?
Alr
btw your bot needs to be online and working when they review it
Well, #rules-and-info has all the info necessary 😄
if your bot doesn't stay 24/7, put a time where your bot can be online so they can test it at that time
well it will stay for 5 minutes atleast when you close your coding
lmao
false
Dude its so hard ı cant verıfy
discord api isntt hat slow
My brain is exploding rk
website is optional
Wdym
If you've made it all the way to have a functional bot but a simple form asking you for IDs and a description confuse you, maybe you should wait a bit until you submit your bot ^_^
^
if there is a red star you have to put it
if there is a death star you have to run
if there is a dark star you have to insert a reference to that tv show
if there is a yellow star then you're watching fnatic 6 years ago
what real
is this real life?
no, its a dream
or just fanta sea?
its a tier 3 meme that goes 7 layers deep
client.users.cache.find(user => user.username === args.join(" ")) How can I put toLowerCase in that variable?
put 'em on both the username and the joined arguments
How do I ban people from using my bot
I would need a database
I need a database to ban people from my bot???
if that's what I'm thinking, yes
just follow the programming logic, put to save the user ids in a database, and return in the handler for these users
should i put .gitignore in the gitignore?
nop
Can i make a command called z!botban
How you design your bot command is up to you @zinc stratus
I´ll just send you my css, gimme a sec
if you want to change both buttons, use
.titleandvote .votebutton {
background: black !important;
}
.titleandvote .votebutton {
background: linear-gradient(-30deg, rgba(244,105,13,1) 0%, rgba(248,203,22,1) 100%) !important;
border: none !important;
transition: all .2s ease !important;
color: white !important;
}
.titleandvote:hover .votebutton:hover {
box-shadow: inset 0 0 100000px 0 rgba(0, 0, 0, .25) !important;
border: none !important;
outline: none !important;
border-radius: 8px !important;
}
.titleandvote:active:focus .votebutton:active:focus {
background: linear-gradient(-30deg, rgba(244,105,13,1) 0%, rgba(248,203,22,1) 100%) !important;
box-shadow: inset 0 0 100000px 0 rgba(0, 0, 0, .25) !important;
border: none !important;
outline: none !important;
border-radius: 8px !important;
}```
did you add that around <style> tags i assume
not sure if the :active:focus is needed, but i have to have it on with bootstrap, so i´ll try removing it later
yes i did
I can enforce the dark theme, the vote and invite button change
But, there is an a element that takes you to the reviews. It has the vote-button class, but isn´t affected by the css at all
hello i am try to make a rps cmd but the user doesnt win. Either the it is a tie or the bot wins
module.exports = {
name: 'rps',
description: 'plays rock papaer sci',
execute(message, args) {
if (!args[0]) {
return message.channel.send('Please include your choice!')
}
let choices = ['rock', 'paper', 'scissors'];
if (choices.includes(args[0])) {
let number = Math.floor(Math.random() * 3);
if (number == 1) {
return message.channel.send('It is a tie we both had ' + (args[0]))
}
if (number == 2) {
if ((args[0]) == "rock") {
return message.channel.send('**I won!** I had *paper*')
}
if ((args[0]) == "paper") {
return message.channel.send('**I won!** I had *scissors*')
}
if ((args[0]) == "scissors") {
return message.channel.send('**I won!** I had *rock*')
}
}
if (number == 3) {
if ((args[0]) == "rock") {
return message.channel.send('**You won!** I had *scissors*')
}
if ((args[0]) == "paper") {
return message.channel.send('**You won!** I had *rock*')
}
if ((args[0]) == "scissors") {
return message.channel.send('**You won!** I had *paper*')
}
}
} else {
return message.channel.send('**Please include either**: *Rock, Paper or Scissors*.')
}
}
}```
this is the code ^^
give me a minute, I'll find the selector for it
ok, thanks a lot
You can edit your bot-description and add the style tags
then put the css code in there
oh lol that was easier than i thought https://cdn.hopefuls.de/xQ1v
@earnest phoenix https://custom.discord.re
Ne, nicht so xD. Schau dir mal die Seite von Hope an
hello?? can someone help me??
@novel slate css selector is ```css
.votebutton.btn.btn-orange
try using that
color is used for the star colors
ok, i´ll try. I think i had a class more, maybe that caused it not to work
background for the, background
Yeah it works, thanks a lot
I think you need to start counting at 0. So 0 would be a tie, 1 would be the bot wins and 2 would be human wins
Just change the numbers in your if-clauses
@novel slate though this also changes your vote buttons https://cdn.hopefuls.de/Wyic
replace your css selector with this
.votebutton.btn.btn-orange[href="#reviews"]
it should only target the reviews button then
Niceee
thx
how can i change the stars and the server?
open inspect element
find the classes
override said classes in your style tag
selecting the .star class as a child should work
.votebutton.btn.btn-orange[href="#reviews"] > .star
try it i havent tested it
You can learn from seeing an example on how it's done.
And I wouldn't say CSS is the easiest language.
These are facts. If you can learn to make a bot, you can learn to customise your top.gg page 😂
still wouldn't say it's the second easiest but hey, that's my opinion ¯_(ツ)_/¯
also I don't like customizing bot pages. that's just more work to maintain if top.gg ever changes their (bad) web page look
How can i change the color from the server button
hi i have a really weird problem
id = bot.get_user(<id-here>)
await id.send(f"{str(cmd.author)}: {message}")
i have this
but when i use the id of anyone except me and my friend it doesnt work
i get this error
File "main.py", line 578, in report
await id.send(f"{str(cmd.author)}: {message}")
AttributeError: 'NoneType' object has no attribute 'send'
i know that all the ids are correct
we've tested it multiple times but for some reason it only dms us
plz help
I'm sure get_user returns a promise
ok what else do i use then
@earnest phoenix
it works for me and my friend tho for some reason
Any idea?
@vale garden resolve the promise?
await
no, get_user returns discord.User if found, otherwise None
yea the thing is the user exists
the id works
and if i do <@id> it pings the user
also
TypeError: object NoneType can't be used in 'await' expression
css
of course you can't await NoneType
also, which server button, i might be able to tell you the css selector
we're talking about the return value, not whether or not the id is valid
is your bot has mutual server
probably not cached
try fetch_user
it's coroutine btw
before that, make sure you're passing int, not str
ye its int
how can i change the color for navbar (topbar) in bot page
css
thx
use inspect element
How can i change the color from the server
but i'm bad coding with CSS lol
this is for development help, not discord help.
xd
change it with color that u want to input
how?
or visit that web, it works too.
i mean how to put in the bot description?
are u talking about the bot development or your web?
@earnest phoenix
bot description on top.gg
oh idk
Just take a look at what Hope send
Start by asking a question, and we'll be able to know if we can help.
what the hell is whith?
I think he meant with
ERROR
TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined
you gave undefined when you should have given a function
.then may be used after a console.log in discord.js??
My music bot play live stream but 5 sec later my automatic disconnect any buddy help for defined what is problem
how to add cooldown in a command?
grammar.
I know
😂
i ddin't understand all
@delicate shore You should try this
let messageCallback = <client>._events.message;
<client>.off("message", messageCallback);
delete require.cache[require.resolve("path/to/file")];
<client>.on("message", messageCallback);```
okk
good evening
?
console.log(...).then({...})
then its undefined
You can't use .then() on synchronous functions
Only asynchronous
if u have autor.tag, than u can probably get guild aswell
where do u use it tho?
let guild
m
@solemn leaf Yes? I'm online now.
how?
how did you define autor?
@solemn leaf Alright
let guild = message.guild
Send me one example again how you command and args should look like, please
oh thx
To send an announcement:
announce #Channel t:Text d:Text
T stands for Title of an embed.
D stands for Description of an embed.
ok, arugments t: and d:
aut"h"or
Finding the right channel in DJS stuff I'm not familiar with
I can sample you my code
but the rest is no issue
give me one qt
wait for discord t open oon my pc
wut?
alright
my O key is sticky give a breack
const Discord = require("discord.js");
module.exports.run = async (bot, message, args, embedconf, whitelist) => {
if (!whitelist.users.includes(message.author.id)) return message.channel.send("You aren't whitelisted to announce! If you feel you should be message japolino#3199");
const Embed = new Discord.MessageEmbed()
.setColor(embedconf.color)
.setTitle("Announce Help")
.setAuthor(embedconf.author.text, embedconf.author.image)
.setDescription("\`\`\`To send an announcement:\n announce #Channel t:Text d:Text\nT stands for Title of an embed.\nD stands for Description of an embed.\`\`\`")
.setFooter(message.member.displayName, message.author.displayAvatarURL({ dynamic: true }));
if (args[0] === "help") return message.channel.send(Embed)
let content = message.content.trim().split(" ").slice(1);
let title = null, announcement = null;
for (let i = 0; i < content.length; i++) {
if (!content[i].includes(":")) continue;
let item = content[i].split(":");
if (item[1] === undefined || item[2]) continue;
let param = item[0].toLowerCase();
if (param == "t") title = item[1];
else if (param == "d") announcement = item[1];
}
if (title === null) return message.reply("no title given");
if (announcement === null) return message.reply("no description given");
let channel = message.mentions.channels.first();
const embed = new Discord.MessageEmbed()
.setColor(embedconf.color)
.setTitle(title)
.setAuthor(embedconf.author.text, embedconf.author.image)
.setDescription(announcement)
.setFooter(message.member.displayName, message.author.displayAvatarURL({ dynamic: true }));
channel.send(embed).then(
message.reply("I sent your announcement in <#" + channel + ">")
)
}
module.exports.help = {
name: "announce"
}
@boreal iron
k
xd
webscrabing
yeah
i know
i am already accessing the website'info.
[{"cell_id":"9926600982282633216","weather":"5"},{"cell_id":"9926594385212866560","weather":"5"},{"cell_id":"9926570195957055488","weather":"5"},{"cell_id":"9926647161770999808","weather":"4"},{"cell_id":"9926572394980311040","weather":"5"},{"cell_id":"9926598783259377664","weather":"5"},{"cell_id":"9926768108050055168","weather":"5"},{"cell_id":"9926765909026799616","weather":"5"},{"cell_id":"9926977015259332608","weather":"5"},{"cell_id":"9926609778375655424","weather":"5"},{"cell_id":"9926607579352399872","weather":"4"},{"cell_id":"9926603181305888768","weather":"5"},{"cell_id":"9926763710003544064","weather":"5"},{"cell_id":"9926605380329144320","weather":"4"},{"cell_id":"9926585589119844352","weather":"5"},{"cell_id":"9926596584236122112","weather":"5"},{"cell_id":"9926583390096588800","weather":"5"},{"cell_id":"9926633967631466496","weather":"4"},{"cell_id":"9926651559817510912","weather":"4"},{"cell_id":"9926581191073333248","weather":"5"},{"cell_id":"9926578992050077696","weather":"5"},{"cell_id":"9926554802794266624","weather":"4"},{"cell_id":"9927001204515143680","weather":"5"},{"cell_id":"9926649360794255360","weather":"4"},{"cell_id":"9926611977398910976","weather":"5"},{"cell_id":"9926592186189611008","weather":"5"},{"cell_id":"9926631768608210944","weather":"4"},{"cell_id":"9926618574468677632","weather":"2"},{"cell_id":"9926576793026822144","weather":"5"},{"cell_id":"9926644962747744256","weather":"4"},{"cell_id":"9926761510980288512","weather":"2"}],"meta":{"time":1606143939}}
.match?
but how in godsname would i transform the weather (the number) into a real weather name
like the number as 992.....
make a json that is like {"9926761510980288512":"WEATHERTYPE/NAME"} then .match
or find
somethng like that?
o`r just ifs
i don't even know where cell ids stand for in thiss site,
let me have a better look
@eternal osprey
great
its switches
{"cell_id":"9926644962747744256","weather":"4"} = CLoudy
that shouldnt be hard
so
json.weather === 4
idk
something like that
huh so the variable i am trying to acces is called weatherString?
i guess?
nope did not work
You can call variables whatever you want
i know
then you can .map
but i am getting all this info from a website
yes
Yeah imo a dict structure would be better
Where is bot liste?
jsonFromApi.map(j => {...jsonFromApi, weather: whateveryourjsonis[j.weather]})
@boreal iron hows it going
uhh what
FakE is typing...
darn... yeah forgot to press enter
module.exports.run = async (bot, message, args, embedconf, whitelist) =>
{
if(!whitelist.users.includes(message.author.id)) return message.channel.send("You aren't whitelisted to announce! If you feel you should be message japolino#3199");
if(args[0] == "help")
{
const Embed = new Discord.MessageEmbed()
.setColor(embedconf.color)
.setTitle("Announce Help")
.setAuthor(embedconf.author.text, embedconf.author.image)
.setDescription("\`\`\`To send an announcement:\n announce #Channel t:Text d:Text\nT stands for Title of an embed.\nD stands for Description of an embed.\`\`\`")
.setFooter(message.member.displayName, message.author.displayAvatarURL({ dynamic: true }));
return message.channel.send(Embed);
}
let content = message.content.trim().split("t:");
if(content[1] === undefined) return message.reply("Title missing");
let params = content[1].trim().split("d:");
if(params[1] === undefined) return message.reply("Description missing");
let title = params[0].trim();
let desc = params[1];
let channel = message.mentions.channels.first();
const embed = new Discord.MessageEmbed()
.setColor(embedconf.color)
.setTitle(title)
.setAuthor(embedconf.author.text, embedconf.author.image)
.setDescription(desc)
.setFooter(message.member.displayName, message.author.displayAvatarURL({ dynamic: true }));
channel.send(embed).then(message.reply("I sent your announcement in <#" + channel + ">"));
}
what lol
This is what I call code that I do not wish to write
It's more complex, the logic, than the previous version I had
okay so i get it
but how do i ever know what weather 5 eactually is?
is it snowy?
cloudy?
https://cdn.discordapp.com/attachments/272764566411149314/780450122529112074/unknown.png
its in the screenshot???
omg i am stupid
so wait @boreal iron
? u're talking to me
if I did t:HEEE EEE EE d: would stop it right?
of course, since d: is empty
okay I prob can do the rest from here thans
The title as well as the description can be as long as embeds allows
stupid o and k keys sticky af
It's btw. way less code than before, you should have told me that earlier title and desc could be a whole text
didn't see him a while
Is discloud good for hosting when your starting as an bot developer?
Even if I know it works I might ask if it does what you expected? 
hey i needed help with friskytool
I havent checked I was doing soemthing
hello
which voice event do i use to calcualte how long a person has been in a vc?
and what are you using to develop your bot
what language?
Just use the event when somebody joins a vc, set a database value as the current timestamp, and when they leave, save that to a 2nd db and have it compare them
no lol its fine
but wont it be a problem if I add like 2 more
and the user uses only 3
Well that would require to split params[1] again, then the next argument and so on
Same schema
ok
It's required to keep the order because you can't split by spaces (since title and desc can have multiple words in it) and you can't split by : because somebody could use the char in the title or desc
okay so i was gonna add feild
I have a reddit command that sends about 5 responses in one time.
Is it considered API abuse? Will it get my bot denied?
command a:abc b:def c:ghi d:jkl
split(a:) - [0] = command, [1] = abc b:def c:ghi d:jkl
[1].split(b:) - [0] = abc , [1] = def c:ghi d:jkl
[1].split(c:) - [0] = def , [1] = ghi d:jkl
etc.
Make sure you have a cooldown on that command and it should be OK.
so people can't spam it
thanks
I mean it sends 5 responses in one time
use css border-radius
Using css, but beyond that, I can't answer 😄
but
there isnt a option
in the website to edit
image
i got this website
from ur staff
@boreal iron my json broken idk
It goes in the actual detailed description, just like it says at the top.
@solemn leaf ur what broke?
then i can't make i m noob at html and css
TypeError: Cannot read property 'text' of undefined
.setAuthor(embedconf.author.text, embedconf.author.image)
{
"color": "#36393F",
"author": {
"text": "text",
"image": "image.png"
}
}
show how you define embedconf
same way yesterday
@remote vessel right click the picture and go to inspect element
imma reset my ping comand give sec
@remote vessel
@remote vessel you will see this:
#bot-img div { border-radius: 200px !important; -moz-border-radius: 200px !important; -webkit-border-radius: 200px !important; }


