#development
1 messages Β· Page 784 of 1
@glacial cipher wow. Joining an discord bot server to advertise.π€
banned
-botinfo 673160436363034626
673160436363034626
Rom.
0743
My first bot to be released. i made an multi funtional bot it has fun commands, moderator commands, some info commands too!
discord.js
?
1
0
No server count
@snow pine
Woiting
@versed thorn plauy
@versed thorn play
I think it has long-term memory loss!
@versed thorn play Diamond Eyes- everything
I forgot which channel I was in, srry
@coral trellis Iara did a big ban
wtf that is Development not #commands
@outer niche discord.Colour("ffffff")
I never worked with Python so yeah its just a guess
Discord.colour has alot of different attributes
You can do it by name, by RGB numbers and some others
There is no black attribute because embeds defualt to that anyway
I made an reddit command that uses args as the subreddit name. But i made an if post is over 18 and dchannel is nfsw etc. But i have the dumb ides that someone can create an subreddit post something nsfw that is not markes as and use this to post nsfw.
Has reddit an nsfw ai?
no
just make the whole command nsfw
i think the whole nsfw thing is too vague once outside discord
its so wishy washy
you could within reason say the whole internet is nsfw
because you never know what some troll has done
@flat pelican ^
@earnest phoenix Don't use bot commands here
@icy mango Same, use #commands or #265156322012561408 for bot commands
hi
can someone say me what i need do add to package.json
!hwlp
!help
-help
-package.json
-info
-botinfo
Please include a bot mention or ID
-botinfo @gilded plank
264811613708746752
Luca
1375
Luca is a bot for managing and informing members of the server
discord.js
- or @Luca#1375
251
1
2 Servers
@fossil oxide

@languid dragon 
@bitter sundial 
Invite | Website | GitHub | Support Server
npm init
npm init will create a package.json for you
no i have but i cleared it mistakely
friend made it f or j
me
npm init where i whrite it
write
then ask him to give it to you again
then wait
where i write "npm init "
in the console, but npm init will create an empty package.json
it will not have the modules you want
oh
cant you restore the file from trash or get it again from whatever place he sent it to you?
he copy pasted package idk where
how to write it
im new
xd
i know how to code some commands
but idk package
xd
npm init creates a new empty package, that means its like creating a new project
you have to give it a new name, description, etc
and then install modules again
oh
how can I check if a number like 1 jumps to 2?

Using maths
Math
module.exports = function(ownerToken, id, debug = false){
try{
if(ownerToken === null || id === null){
console.error("Missing parameters")
return
}
const request = require('sync-request');
var res = request('POST', 'https://discordapp.com/api/oauth2/applications/' + id + '/bot/reset', {headers: {'Authorization': ownerToken}});
var body = JSON.parse(res.getBody().toString())
return body.token
} catch(err){
console.log("Server Error: " + err.statusCode)
}
}```
I want to use this code to get it automatically if the "bot" token changes. Do you think you can check if it's reliable?
Source | Github Link: https://github.com/AnonymoCraft/discord-token-autochange#readme
you're not allowed to do that
yeah no
you're actively logging in with a user token outside of the official client, which results in account termination for breaking the tos
My "bot" token is constantly changing. I have to use this or it happens that it is offline for 5 hours.
I sent an e-mail but the problem still continues.
your token gets reset if you send 1000 IDENTIFYs through the gateway
in a 24h timespan
It constantly exchanges discord.com/developers tokens.
Or token on your github
maybe you should fix logging in a thousand times a day
How can I fix 5 projects are open.
what
i using glitch.com
well don't
max 512 mb ram
wait, so you're saying it uses a login to your developer portal
that raises red flags
yes developer portal is changing auto in my bot token
no it isn't
discord is resetting your token as a protective measure
because you're logging in a thousand times with the same token
per day
Morning token:
can you read
yeah it's not changing your token it relogins with your token, i bet there's a high chance it's stored somewhere else that you might not know about
like i said
the token gets reset after 1000 IDENTIFYs within 24 hours
which matches the fact that they're using glitch
which is an unreliable host
okay my host is glitch.com free? im poor okay? π
reset your token anyways
most of us aren't rich here either
i using 5 project is my bot
Reset your token please
i reseted
A VPS is like $3
a vps is 3 dollars a month, don't go to starbucks for a day and you got it covered
But yes Don't use an Autochanger and we won't help you with that issue
I have been having these conversations for 1 month. My problem is still not resolved I do not have enough money to buy vps. The euro is too expensive in my country!
dollar, euro
It's against ToS and the reason for the content resets is almost 100% your fault and your responsibility to keep you token safe
Isn't a euro worth more than a dollar
@modest maple https://github.com/AnonymoCraft/discord-token-autochange#readme its safe? π
pls
@toxic jolt NO
probably not
π¦
i how to fix π¦
its safe? π
nO
huh is it actually that easy
What don't you get about YOU CANNOT USE A SYSTEM TO AUTOMATICALLY GET THE TOKEN
i how to fix
already said; fix your code to not login a thousand times a day or use a reliable host

that or you're leaking your token on github
@toxic jolt hey
Try use heroku instead it's basically the same as glitch, totally free and a little bit more reliable. Although it's kinda hard to set up for beginners
no
My token changes every 5 hours. I think it originates from Discord.com/developers. I sended discord support mail
Although a vps is better
why does my bot restart so often
Your token
before it didnt
heroku isn't built for and doesn't allow hosting discord bots with an uptimer bot
heroku isnt free you have a limited amount of monthly hours and Im pretty sure there's a hard cap as well, but not sure on that
550 hours
@analog owl
https://sourceb.in/dae1e83ed7 plzz help me in this error
Free text/code sharing site supporting 450+ different languages!
Does anyone else here use D||iscord||B||ot||M||aker||
we don't offer support for bot makers here
No the program Discord Bot Maker on steam
We don't offer support for DBM here
https://sourceb.in/dae1e83ed7 plz help me out
Free text/code sharing site supporting 450+ different languages!
You are trying to turn a Nothing in to a integer
you know search engines exist right
@snow pine
ur German?
Yes
Link well. All results are broje or already tested from me. And nothing works well / crashes
then you can probably create your own
couldnt receive any help on djs, so im gonna ask for help here - my bot doesnt respond on prefix calls. i tried logging it, but it wont work after if (command), meaning it cant execute it. any ideas?
if (!cmd) return?
dude
any command
ng.ping, ng.help
not just the ng.
@earnest phoenix
i might be dumb but not that much
Anyone good with react?
yeah what's up
I have a data like this
commands = {
bot: [
{ name: 'something', desc: 'something', usage: 'something' }
]
};
I want to display all the objects in bot array and other arrays in commands(if they exist) in a table
map the array so it returns an element
@glacial anchor can u try this https://hastebin.com/ucozudecoy.cs
My code was this
{Object.keys(this.commands).forEach(i => Object.keys(this.commands[i]).forEach(j =>
<tr>
<td>{Object.values(this.commands[i][j]).name}</td>
<td>{Object.values(this.commands[i][j]).desc}</td>
<td>{Object.values(this.commands[i][j]).usage}</td>
</tr>
))}
But I'm not good with mapping :/
Epic
Ty
I never use map tbh
That's why I'm like this
Imma read mdn, wait
And why forEach doesn't work?
@earnest phoenix i already said all the checks work
it breaks right before if (command)
How do I make my own bot code?
Me?
all you have to do is access the bot array
please dont ignore me here at least
and forEach doesn't work because it's iterating an array, the method needs to return an array so react can resolve it
- other arrays if they exist
It will become like this
command = {
bot: [],
fun: [],
...
}
that's still not an array though
yeah
Each key the object has contains an array of objects
i feel like you're overcomplicating this
just map commands.bot, commands.fun etc
Like ```js
command = {
bot: [
{ a: 'a'},
{ b: 'b'}
],
fun: [],
...
}
Wait a sec, I don't have to map them all at once tho
yeah
It is determined from a dropdown, so I'll better use commands[category]
yeah that can work too
{this.commands[this.state.dropdown].map(idk => {
<tr>
<td>{idk.name}</td>
<td>{idk.desc}</td>
<td>{idk.usage}</td>
</tr>
}}
Syntax error at line 1 end
{
Idk what to put
Nvm
you're using squiggly brackets instead of parentheses for the return func
... () => (/*is this return value in arrow function?*/)```
yes
It worked finally
I got IMPORTANT question
I learned some new things today. Thanks for the help
How do I make my bot count the server members everytime
everytime what
Everytime anyone joins
which lib are you using
I'm using the application web
what
wut is application web
that's your bots id yes what about it
I want to let my bot work like that
click on the link i sent above
...it's a discord message link
Also, you know anyway to do these designing of my page automatically lol
what do you mean?
When you send it
I mean like page design will be good in my pc
help me https://sourceb.in/dae1e83ed7
Free text/code sharing site supporting 450+ different languages!
But won't be in other device having diff resolution
yes
google responsive design
since you're using react consider looking into some UI frameworks which have that done for you already
So I wanted to know whether there's any feature that does this convertion automatically instead of using @media-screen or whatever it is
Oh well sorry for the ping
what
Your discord message link
Is there any UI frameworks that does it?
Suggest me a good one
i use material ui in a lot of my projects
people also like to use blueprint and semantic UI
So what does material UI do?
makes websites look like google
Like google uh?
I wanted to do this: I design for 1 resolution and it will look good in all resolutions
thats called responsive design, and there are millions of ways to do that, and lots of libraries do it in different ways
material ui is like an interface style, that both does it for you, and implements their idea of design for you
the material style is used by many google products and dashboards
@kindred wadi advertising your own bot = ban
That's my only goal and idk what is material style tbh
@coral trellis looks like an ad ^^
Uh
Don't use luca here
@kindred wadi Don't send ads, it's against our rules
hello i would like to know if i can host a bot for free? If yes, how ? PS: I am French.
google compute engine: free for 12 months
amazon aws: free for 12 months
glitch.com: free but restarts your bot every X minutes (can be worked around)
heroku.com: free but restarts your bot every X minutes (can be worked around)
^ all of the above bar maybe Google and Amazon will have some very serious issues wuth any sort of high load
How to style a dropdown?
It doesn't work in the usual way for me
<select id="select">
<option value="a">a</option>
<option value="b">b</option>
</select>
I did ```css
.select {
background-color: #fff;
}
yup
wow
it's why i suggested those ui frameworks - they already have them built and styled and you can most likely change their existing style
But that material UI seems like I have to use that particular font
So it's changed then?
material ui has a themeing option which allows you to change the font
i use poppins in my app
I use product sans like one
@font-face {
font-family: 'Product Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'),
url(https://fonts.gstatic.com/s/productsans/v5/HYvgU2fE2nRJvZ5JFAumwegdm0LZdjqr5-oayXSOefg.woff2)
format('woff2');
}
And I really have some trouble tbh when I needed to use small size font http://prntscr.com/qyisz5 and also the bolding change problems, is there any other good fonts that I can use?
have you tried changing the font weight
why don't you just grab opensans from google's cdn
Wait nvm, it somewhat works
i'm pretty sure you don't have definitions for other weights
also
you're not allowed to use product sans
product sans is under copyright and you can get a DMCA takedown
That makes it look like that and not real product sans I guess
Not so good like product sans tho
again you're not allowed to use product sans
kk then
even if it doesn't look like it, you're still using it
Which one you use? You mentioned one
I don't like g in open sans, I want it to look like poppins' g but not use the whole poppins font
Finding font is hard tbh
browse the fonts page until you find something you like π€·ββοΈ
monsterrat is close to product sans but it's wider
Nunito is better tbh
Found a nice one, https://fonts.google.com/specimen/Varela+Round
looks nice but lacks font weights
you can't add it unless you design the vectors for each character for other weights
Oh well. That's hard
I'll better use nunito sans for now
So font-family: Nunito Sans will work?
where?
select the font on the google site
it gives you code you can put in your css
though if you plan on using material ui, use their themeing api
Can you tell me one last time about material UI?
I can do responsive design too with that right?
Hey,does anyone here have any documentations/wiki about self-hosting a bot on your machine?
I.e specs/internet speeds etc etc.
Specs: low
Intenet speed: low
Should work for a basic bot
π Cheers.
But it depends on what kind of bot you have and on how many servers its active
more like
specs: low / average
internet: can be slow but needs to be stable
And it seems like I have to build my whole website using their components?
i mean you can use your own
but it's suggested to use theirs
because of controlled support and consistency
So that it'll be responsive right
yup
So it has everything that is in html?
Building everything according to them is hard tbh
what building?
Like I use ```jsx
<button class="x"}something</button>
that's not necessary
their components have their corresponding css injected already
you're looking for https://material-ui.com/styles/basics/
like i already said you can use whatever font you want
browse their docs
they're very thorough
did you ignore the whole part of me saying to browse their docs
lol I really can't understand much from it
they also say that
And this http://prntscr.com/qyjux7. I use components so am I supposed to put that line in each component I use
you create the theme outside of your App render, then you wrap your App component in ThemeProvider
and no, you can just use multiline imports
What
import { a, b, c } from 'package'
vs
import a from 'package/a'
import b from 'package/b'
import c from 'package/c'
You don't get it
I use those components in App.jsx
I asked whether I should do import Button from '@me..... for each component or what
Ok leave it, can you just tell me https://discordapp.com/channels/264445053596991498/272764566411149314/675024521350217734 cuz all I'm looking for now is responsive design and you mentioned it does other things too
I mean aren't those components just for design?
well yes and no
a lot of components offer stateful/controlled design apis
text fields have an onchange event
etc etc
Oh
which is why i am telling you to browse the docs and i still don't understand why you won't browse them for a bit
I thought those components are just for design
Thanks for the help, I'll try to rewrite
async def profile(ctx, member : discord.Member):
l = ", "
l = l.join(f"{member.roles}")
profile_picture_url = member.avatar_url
number = random.randint(1, 100)
embed = discord.Embed(title="Profile Description", description=f"Requested by {ctx.author}", color=3447003)
embed.set_image(url=f"{profile_picture_url}")
embed.add_field(name=f"Roles:", value=f"{l}", inline=False)
await ctx.send(embed=embed)``` how can i fix the , inbetwe evething
.join(' ')
lamo jesus christ how are you taking a string object and splitting that shit

so insted of this .join(f"{member.roles}") put .join(' ')?????
i have never seen anyone manage todo that yet lmao
@outer niche its a list, tuple
each role has an Id, name etc...
iterate through said list of roles
get name
i think thats what u want
I mean either or would be fine
i mean one is an awful way of iterating through a list just to get the ending string again
What's another way I could
i just told u
u can iterate through
and get names
rather than
taking a string
and going through
everything
to split it
to then join it
to be straight back where you were
before you even .join'd anything
I really just want to fix the issue with , after every letter
l.join(f"{member.roles}")
This is some high IQ stuff I'm ngl
who know how to do simple gamble bot?
You should be able to find one on the site
wdym by gamble bot
like nadeko bot
just use random numbers
a person did a copy of nadeko
with level 3 server?
anyway if you want to make a bot, do you have any programming experience?
well, first you need to pick a programming language and learn some basics
try websites like codecademy
@earnest phoenix check out https://vinniehat-1.gitbook.io/guide-to-making-your-own-discord-bot/
thats the thing, there is no "just"
bot programming is complex
knowledge
damn
if you want to "just" own a bot, look into tools like discord bot maker, or services that do it for you like botghost
botghost?
but be aware that those are not supported here, and your bot wont be allowed to be listed on top.gg
botghost is essentially a service that creates a small simple bot for you and you just customize it by using templates
damn#
I don't recommend using botghost out of every other service because you have a watermark and basically its impossible to make an economy system on it
idk if im gonna risk it tho
damn
i only want to make economy bot
DBM is paid and not as good as coding it yourself but it at least has some decent power to it
you can try dbm
it does support storing data
wich then allows you to make economy
maybe not as efficient as coding but yeah
I used dbm before I switched to coding
sorry if im being stupid
They have a support server
economy is basically just math and storage
yes
ah
@earnest phoenix a bot was how i started coding 
same
u guys know how to make economy?
you just need a database and the basic math
learn to code first
as i said, if you know math, and how to use a database or any storage system, you can do it
get used to a programming environment
You can start coding by making a bot but in a perfect situation its not ideal 
It can take some time for you to get into it
hmm
what the best website to learn coding
When I first started using JS I made a bot but I had plenty of previous knowledge
depending how fast u learn
anything that isnt youtube
well, first step is to chose a programming language
is it possible to create a chart inside of node.js to display it with a Embed?
I recommend node.js
popular user-friendly languages are C#, Javascript, Java and Python
take a look at each of them, and see if you like some
but there is also python, java and many other
is notepad++ good?
its decent
better than ms notepad
you can also try visual studio code its pretty good
notepad++ is good, very fast and supports styling and plugins, so it can do most of what others do,, even if not as well. but in the end, its just an editor, it wont make or break your code
you can also view info about what some code does by hovering over the spot its pretty cool
(in visual studio code)
its also a good code editor, more advanced than nodepad++
also you can use custom themes and other plugins
niceee
or any jetbrains ide
i rather vsc
now the first thing you need is to setup your environment. for example if you chose to go with Javascript, you will need a javascript environment like node.js. if you go with python, you need to install python, etc...
vsc is just the editor, you need to chose a language
you need to choose the language you want to write the bot in
and install the environment for that language
vsc supports many environments and languages
I recommend javascript since its pretty simple
when chosing a programming language, you should look at the long term, what kind of skill do you want to learn for life?
for L i f e
for example, Javascript is suited for web programming and website applications. if you like that, its the ideal language to learn on the long run
aka the websites you see
C# is better suited for windows applications and software
Java is good for servers and infrastructure
Python is good for general programming and calculations
get DBM its pretty simple if it is just an economy bot
okay what dbm stand for
they got it even pre compiled somewhere
discord bot maker
okay
used it before but it was to limited for me.
same
i've never used it lul
you have many possibilitys in it but soon you will reach your limits
its braindead javascripting
damn
well, dbm can teach you some very basic javascript so why not give it a try
the simplest language to start with is indeed Python, as its syntax is very simple. but, as its interpreted, its gonna be slower than other languages
damn it hard ngl
not really you get a gui where you set one snipped that you fill out in an other gui
ive had a bad experience with python, and it was hard moving on javascript from it
besides the other things
never coming back
@quartz kindle ur weird AF
<3

i'll try find how to make economy bot on tr
*af
yt*
javascript is relative easy to learn. got the basics after 3 days or so
NO
@modest maple i mean using tabs and colons to make an if statement
NOOOO
it does not work like that in other langs
ANYTHING BUT YOUTUBE
anidiotsguide is not bad
@earnest phoenix first of all, decide the language
anidiotsguide is mainly js @lusty quest
i know
idk im stressed due to school exams
@marble juniper i hope youre sarcastic
yes
use html
nah use brainf*ck
use css
restcord for php
css has the best error descriptions tbh
css to style your bot
ok stop im gonna puke

lol
code it straight up in binary code
brainfuck?
imagine a hardware discord library
brainfuck but javascript
nice
wouldnt that be cool doe @quartz kindle
use Cow
plug it in via usb, install it as a driver and run it
epic idea
well
jsfuck best encryption
its an idea
imagine assembler discord lib
wtf is whitespace
a programming language that only uses spaces
i know. but debugging the code is stupid
being stupid is the point of the entire language
because stupid is fun
that language that uses emojis only was kind of fun
and Cow is binary but with 3 letters
my favorites are chef and shakespeare
i tried making my own language based on Python which used only cuss words
and of course the classic LOLCODE
got stuck on the lexer and abandoned later on
i can has stdio
ah yes lolcode
theres a language that revolves around fetishes
id link it but I dont wanna get banned 

what was the Css tag for this again?
Outline?
or border
It's the bot avatar's border
hmm
its a box-shadow
try border: none;
also for border it should be ^
i dont know if it is gonna work, didnt do css in months
do box-shadow:none
wait fuck
also mind the specificity
the original box-shadow has a specificity of 2 classes
.columns .bot-image
your css needs equal or higher specificity
more specific selectors override less specific selectors
smh abuser
Abuse all !importants
Just because it compiles stupidly I use it
Btw. I made my reddit command if its not an reddit i whitelisted to nsfw but some meme reddits are whitelisted and can be displayed without nsfw setting in the channel
Is thia ok? What you think here
only thing wich matters is that your bot doesn't send nsfw content in a non-nsfw channel
Reddit has NSFW content, what have you done to stop it from sending?
NSFW content is not allowed in Non-NSFW Channels
I think reddit also has a NSFW tag for NSFW content, but I never worked with their API
well I have seen in bots like mee6 that besides the reddit post content there is an nsfw tag
so I suppose you can check if it has an nsfw tag
yes
does anyone know a json formatter that can be customized on a per level basis?
like keep 1st and 2nd levels on new lines, but keep 3rd levels in a single line
actually nvm, jsonlint doesnt exactly what i want even tho it has 0 configuration lmao
Anyone here very good at coding Discord bots? Message me if so
Would be paid work ^
Anyone have experience in (play music in voice channel) ? Discord.js
ask your question and wait for someone who can answer to help you
is there a way i can have discord accept OAuth redirects with varying GET parameters?
ie instead of only being able to redirect to example.com/something, allow example.com/something example.com/something?foo=bar etc.
what do you actually want to do
How would I set "message.member.hasPermission" with permission ID?
hasPermissionID is causing "invalid permission string or number"
( NPM, Node.js, Discord.js, Windows 10 ) etc blah blah for anyone curious
whats the fastest node.js http client
oh hasPermissionID isn't a function my bad
ive been using request but its kinda bulky and slow
and ive tried nodefetch but i wanna know if there is anything better
request 
I like to use node-fetch myself, but look up phin.
I don't know the "fastest" (and there's probably no good way of determining it)
pleeease help me code my bot, im going crazy trying to do it myself
@lone garnet uh try using Youtube?
If you do not want to start it from scratch like the rest of us, YT is a good option, otherwise github.
ooof i just want my server to workkkkk
YouTube is a
option.
learning bot development
You should learn a programming language you want to use then refer to the docs of a Discord library for it.
yeah, youtube tutorials are great for starting but once you get more into it the docs are a lot better imo
@unique nimbus i can check if the post has nsfw but if someone create an own subreddit and post there nsfw without marking it it wouldnt trigger
does someone got it working to get a chart created with chartjs-node-canvas attached to an Embed?
Has anyone seen this error and know whats happening. Python3
Error in data transfer
Traceback (most recent call last):
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websockets\protocol.py", line 528, in transfer_data
msg = yield from self.read_message()
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websockets\protocol.py", line 580, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websockets\protocol.py", line 645, in read_data_frame
frame = yield from self.read_frame(max_size)
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websockets\protocol.py", line 706, in read_frame
frame = yield from Frame.read(
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\websockets\framing.py", line 100, in read
data = yield from reader(2)
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\asyncio\streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\asyncio\streams.py", line 517, in _wait_for_data
await self._waiter
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\asyncio\proactor_events.py", line 280, in _loop_reading
data = fut.result()
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\asyncio\windows_events.py", line 808, in _poll
value = callback(transferred, key, ov)
File "C:\Users\gunzb\AppData\Local\Programs\Python\Python38-32\lib\asyncio\windows_events.py", line 453, in finish_recv
return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
It's a windows error
Basically fucks async stuff
And not much you can really do except maybe try a different Py version e.g use 64 bit not 32
is hosting a bot on a raspberry pi 4 a good idea?
depends on the bot size, it's good for little bots but not for big bots
how big π€
how much ram does your pi have?
How do you use the bot???
the bot
Unless you're talking about Luca/DSL this is probably not the right server. This channel also wouldn't be the correct place to ask
-wrongserver
Hey! We think you have our server mistaken.
We do not provide support, help, or advice for any bot.
You need to click on the "Support Server" button on the bot's page, not the "Join Discord" button at the top of our website. If there isn't a button that says Join Support Server, then we can't help you. Sorry :(
It's the dice bot it said to come to this server with questions
@ember scaffold you clicked the "Join Discord" in the nav bar
you need to click "Join Support Server"
Does anyone know a way in Discord.py to differentiate between desktop and mobile. Im using embed tables and they separate on mobile?
I honestly don't know if d.py actually has support to see if the user has mobile or nit
the api supposedly has a client_status field in the presence packet
which contains desktop/mobile/web
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
Mmmh ty
or actually i misread
it seems that the client_status should contain an object like this
{
mobile: online
desktop: idle
}```
Nice ty this is helpfull
Active sessions are indicated with an "online", "idle", or "dnd" string per platform. If a user is offline or invisible, the corresponding field is not present.
but keep in mind that the person could be online in both mobile and desktop, and be using discord on desktop
Yh
so formatting things specific for one or the other is not really worth bothering
Guys help me with this problem
i use the right format
.setTitile()
.setColor()
.setDiscription(0
& so on
setTitile
like gorillaa and me said
also you can only put 1 setDescription
ok
Building 3631 actions with 6 processes...
REEEEEEEEEEEEEEEEeeeeeEEEEEEEE unreal engine
Hello, ive been trying to http get images from discord attachment urls, unfortunately I keep receiving warnings that I need to "enable cookies" from cloudflare/discord.
https://i.imgur.com/6EHLfIt.png
Im not setting any crazy headers or anything. If anybody know what header im supposed to set for this to work itd be great.
Pretty sure you can only access files that you share a server with
let raison = message.content.replace(",", "σ σ ").split(" ").slice(3)```
Why i have these `,` with the replace and without...?
@modest maple are you sure? Im able to open these images in my browser where im not logged in
resolved
using d.js master
const { Client } = require('discord.js')
const client = new Client()
.on('ready', _ => {
// how can i get my client object here?
})
.login()```
client is a Promise { <token> }
try console.log(this)
{}
try a normal function instead of an arrow function
i guess i could do client.on instead
well no clue, just dont really understand why client is a Promise there
because client is defined client.on.login
thus the client variable becomes the result of .login()
ohh
makes sense
okay now i absolutely dont understand this
new Client().login() still makes client a promise in client.on('ready')
because login returns a promise
you probably want to do this instead js const client = new Client() .on() .on() .on(); client.login()
This channel is for development purposes, go to #memes-and-media
is there an way to set an image in a buffer as image for an embed in .js?
@quartz kindle ohh yeah that makes sense, thank you
@lusty quest you need to use both setAttachment and setImage
[20/02/06 | 17:07:05] Shard Disconnect
[20/02/06 | 18:58:54] Shard Disconnect
[20/02/06 | 19:46:51] Shard Disconnect
[20/02/06 | 19:58:37] Shard Disconnect
[20/02/07 | 01:31:24] Shard Disconnect
[20/02/07 | 01:55:20] Shard Disconnect
[20/02/07 | 11:16:35] Shard Disconnect
[20/02/07 | 11:52:47] Shard Disconnect
[20/02/07 | 12:18:48] Shard Disconnect```
gj discord
stable as always
@modest maple any perks as booster
And I think you get a special channel when you boost
const attachment = new Discord.MessageAttachment(image, "image.png");
let embed = new Discord.RichEmbed()
embed.attachFile(attachment);
embed.setImage("attachment://image.png");``` what is wrong with this? the image is buffered but the embed say its a string
are you using v11 or v12?
because in v11, attachments should be new Discord.Attachment(), and in v12 embeds should be new Discord.MessageEmbed()
MessageAttachment is for v12 and RichEmbed is for v11
v12
Uncaught Promise Error:
TypeError: The resource must be a string or Buffer.
at ClientDataResolver.resolveFile (W:\Discord Bots\Captain-Vor-Production\node_modules\discord.js\src\client\ClientDataResolver.js:278:27)
at Promise.all.options.files.map.file (W:\Discord Bots\Captain-Vor-Production\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:167:30)
at Array.map (<anonymous>)
at TextChannel.send (W:\Discord Bots\Captain-Vor-Production\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:166:40)
at Object.exports.run (W:\Discord Bots\Captain-Vor-Production\commands\playerchart.js:61:21)```this is the exact error
are you sure you're on v12?
it should
wait why tf did i run in node 10.....
btw i mean discord.js version, not node version
ok im still at 11 i thouth i was at 12
ok, so in v11 it should be new Discord.Attachment()
no
i cant get webhook to post in server please help
context
I am trying to connect tradingview alerts to one of my channels. I have created webhook and added it for the alerts but still nothing
having a webhook doesn't mean it will suddenly post by itself lol
I pasted the webhook into where the alert tells you to put it and then it should push the alert to the webhook when its triggered
right?
i have no idea what you're talking about
the webhook needs to support discords format to work
I have seen others have the notifications come through discord, I assumed this was how
How can I format it so it will work?
people build their own middleware for that
service posts to user's server, user's server posts to webhook
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
how do I use that?
the docs say how to
POST to the endpoint with required json params in the request body
where do put in all of the params?
what
How do I put all of this stuff into the webhook
you dont
how do I post to the endpoint?
that website above explains how discord webhooks are formatted. the websites and services that will send webhooks to discord need to support that format, if they dont, you need to send the webhook somewhere else to translate the webhook from one format to another, ie from your website's standard format to discord's format
ahh okay thanks @quartz kindle so is there something I use to do this?
there are a few services that translate webhooks, i think IFTTT does that
i cant figure this out
try this
Get a random URL instantly and in realtime test, inspect, forward and script Custom Actions for each incoming request
send your webhook to here, so you can see what it actually looks like
then compare it with the discord webhook docs
Okay, so I have a bot that's pretty much ready to be used outside of my server but it requires Manage Channels(as it creates a channel for matches to take place in) and Manage Messages(because it deletes commands and deletes and/or modifies responses after a certain amount of time in certain cases) so I don't ever expect it to make it into this server.
What is the best way to get it out there for people to see? If I posted this in the wrong place, I do apologize. I'll gladly move it to the right place.
It will be invited to this server but without permissions
that's the problem, the core features need those two permissions. That's why I was asking what other alternatives do I have to get the bot out there.
Really just making sure your bot states what permission it needs
oh?
The bot being in this server doesn't exactly do much, your bot will still be listed on the website
I mean if the bot doesn't have, let's say, Manage Channels permission, make it state explicitly state that
touche

thank you shivaco
π
I dont know how i should style my forms
forms are a pain in the arse
@quartz kindle all of those webhook translators have limited amount of triggers, do you think itβs possible of making a bot within discord that could perform this function?
a bot is useless in that situation
you need to host a webserver
that way you can put your url
the webhook gets sent to your webserver
your webserver translates it to a discord webhook and executes it
or have the webhook be sent to your bot and have your bot post it himself lol
but why
that's overkill because you'd still need a webserver to intercept the webhook
ummm can someone help me?
do not ask2ask
umm i need help.....
ask your question and wait for someone who can answer to help you
let logsChannel = message.guild.channels.find(channel => channel.name === `logs`);
logsChannel.send(`This channel has been set as the logs channel!`);
So i wrote this to find the channel, it worked the first time i wrote it but suddenly it stopped working. I havent changed anything
does the channel in that server? what happens when you run it?
any error?
(node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of null
this is the error i receive



