#Commands, API v1 Feedback
1 messages ยท Page 1 of 1 (latest)
W update
W feedback
W team
W site
When auto fetch of most used commands from app dir? 
This I thought of actually, but I have a different way I wanna do this :)
Epic!
mentioned the API will require to make a new token is it the api for posting commands ?
No, only for the new endpoints
The posting API works with both tokens
just tried to create a new v1 token but got an error 401 ...am i doing something wrong??
Could you share your code? (don't share the token)
Make sure the token looks as follows:
headers: {
"Authorization": "Bearer " + token
}
workssss thankss
awesome!
Sub-commands (and context menus) are currently being ignored by the uploaded payload, are there any plans to support them in the commands overview?
Wait so are stuff like eg. /fun coinflip working for the commands api
For now we're not displaying them, there's plans to add them though yes
Subcommands aren't displayed for now no. So you'd just see /fun.
Alright 
Oh
Well that really sucks
They're going to be added
Most of my bots commands won't show then
Ah great
q, does anyone know why custom fonts broke? it's rendering the default browser font, and not Outfit which I am importing. but it's also not the default top.gg font
in addition to that, could we maybe get utility classes that never change? like button because I am a little tired of updating my description css/html every time anything changes
the font used to work but randomly bring now, couldn't find anything in the network tab so not sure, maybe csp?
we didnt change anything related to csp
neither did we change anything in thisupdate related to the overview tab
how long ago did it last work?
Generally though, I recommend using Manrope (the default top.gg font)
We optimize the page for manrope on the server, so it can cause content layout shift if you override it
Maybe it's time for a better editor in general lol
I will soon implement this on my bot but temporarily how is it formatted is it a JSON with the slash command ID?
Like { name:"help" id:"blahblah" }
Cause I see you can add it manually from the dashboard of the bot.
as long as it follows the slash command create properties you can yes.
yo who made that image
So I was right using the JSON format?
yes
when I try to input it fails?
can I have a example of how its supposed to be that github link shows a different language im using javascript.
Oh I found this
option_data = {
"name": param.name,
"description": getattr(param, 'description', 'Parameter'),
"required": param.required if hasattr(param, 'required') else param.default == param.empty
}
seems that wasn't it I have to find one for javascript I guess
it needs to be in an array
[{ "name": "my-command", "description": "This is a command!", "nsfw": false }]
oh ok that makes sense
also I think this is a bug but when I click on Import when pressing import from Discord it doesnt dismiss the modal it just stays there but I got it to work thank you!
Will fix!
Small thing @wide dome but it would be nice to have better support for context menu commands, little weird for them to be showing up as if they're slash commands
I'd also suggest maybe showing the options for slash commands, see https://discordbotlist.com/bots/ostra/commands as an example
this is planned to be added yes
fair, we can take a look at this on the next polish update
glad to hear, will it be necessary to resubmit commands or is the data already stored
would be appreciated ๐ and maybe take it as an opportunity to explain to users how to access them, feel like a lot of users don't know about context menu commands
I would recommend setting up submission through the API
that way you'll always be up to date when we make updates
yea of course i just did it manually as a quick and dirty thing since i was already poking around in the settings because i noticed that some update at some point (not recent) broke how i was detching light/dark mode lol
so i was fixing that and saw the commands option and was reminded of it
it was like "i'm already here so why not"
I'm an extremely extra person.
clean!!
the first thing i saw was data-theme on the root html element but then also realized that doesn't get set if you use "auto" so yea
<style>
@media (prefers-color-scheme: light) {
.ostra-dark-theme {
display: none;
}
}
@media (prefers-color-scheme: dark) {
.ostra-light-theme {
display: none;
}
}
html[data-theme="dark"] .ostra-light-theme {
display: none;
}
html[data-theme="dark"] .ostra-dark-theme {
display: block;
}
html[data-theme="light"] .ostra-dark-theme {
display: none;
}
html[data-theme="light"] .ostra-light-theme {
display: block;
}
</style>
it's disgusting but it works
fixed unacceptable previous behavior (light mode screenshots used in dark mode) (we know how discord users feel about that)
๐ธ
but yeah i agree this is the best way
dbl users are told the same
but yeah can take a look
we have a different project ongoing first that i wanna finish
afterwards we're doing another polish update
auctions v2 /s (unless)
kinda trying to keep that pattern
yep :)
finally 
its been ongoing for a while now
i just hope the backend is more stable
it will be a lot more
wonder how much money top.gg have potentially lost in outbids for the current system due to outbids not being pushed to the UI reliably
probably a lot
i lost 3 slots this week that i thought i won because the UI showed that i did 
new system will respect that people live in diverse timezones and have lives /s

i have so many questions
Basically a way for us to A/B test new tags for you
see if the clicks are higher
if yes, we'll add it to the rotation for you
ah that's cool, was wondering if it was just something like "we'll take your bot description and give it to an LLM and see what tags it thinks are most appropriate"
that way you can just sit back and we make sure you get the best possible growth
still a lot to be done though
hopefully it can go out soon-ish
probably first tests will be 2-4 weeks away
best of luck finishing it and explaining the changes to users in time for the first ad period
it'll be a LOT easier
oh current system is obnoxious to explain to people i agree
the what
you set your own start and stop dates
oh that's nice
but can one big bot dev just say "i want to spend 1k and lock down this slot for a whole year" 
wdym
if a user visits top.gg, there's a cooldown on how many times they'll see the same ad in a row
they're not gonna click on an ad after shoving it in their face 5 times in a row
oh yeah i didn't mean from the user side, you said that there's no set time anymore and people can just pay for whatever time they want
i'm saying imagine a smallish slot like reaction roles slot 1, can the big guys over @ droplet just decide "I want to pay like 3 grand to have this slot on lock for a whole year"
you set your budget, and we will give you impressions
if they pay 3 grand a month maybe
for a whole year would be hard
but even then, we will rotate ads for users who've seen the same ad several times
to make sure we dont waste impresisons
oh i see, so there's no guarantee that you keep your spot if someone else comes in with a higher offer after the fact
i mean the spots are fluid from this point on
so instead of being ๐ locked in at 3pm EST on monday, you can now get yoinked at any time hahah
every view the ad goes into a new bidding cycle we get the best fitting ad for the user
no
it's all automatic
you set a budget
we take care of the rest
e.g.
still get impressions estimate?
my budget is "35$/day" for 10 tags
well what i should be asking is, is the pricing still going to be cpm based
here's how many impressions we expect you get in this time: xxx
pay here:
manual bidding is possible yes
which is basically setting a max cpm
hopefully will make more sense once i get to see the new system

likewise ๐
Is there an official way to add the commands with discord.js like I would need to manually do the adding of the commands.
oh ok thanks cause right now I know posting stats work for servers work
I kinda like how dlist shows commands with all their options and their type (string (incl. choices), boolean, number, ....)
Hey Veld so I see that a 3 days ago commit was added to this guys repo called Commands-to-Top.GG and it looks like its what I need for my discord bot.
https://github.com/TermuxHackz/Commands-to-Top.GG/blob/master/discordjs/index.js
Detailed Guide on how to post your discord bot commands to Top.GG using NEW v1 Token - TermuxHackz/Commands-to-Top.GG
separate from our SDKs but you can use whatever you want
so you're telling me to just wait for the offical SDK?
not per say, its just a fetch call to our api you can also just add it yourself
fetch("https://top.gg/api/v1/commands", {
method: "POST",
headers: {
Authorization: "Bearer {TOKEN}"
},
body: JSON.stringify(commandsFromDiscordJs),
});
all you need really.
also RE: "Bearer is required now yes" #topgg-open-source message
should probably include something about this in the docs
currently it's just https://docs.top.gg/docs/API/@reference/ which doesn't include "Bearer"
Basics of the API
gotcha, good catch. I forgot to update this to the versioned api.




