self-hosted help
1. How do I remove the limitations on emoji and starboard count? I'm satisfied with a command that adds credits to the current server or excludes it from requirements (the bot is intended for only a few servers), however there doesn't seem to be a way to add credits to a user or premium time to a server without editing the database--I used I stubbed out premium stuff
2. What does the owner setting do in the environment file? This doesn't seem to be documented.
- Edit: it appears this allows the owner to use a SQL command? This command doesn't show up, though...
3. How do I use a Unix domain socket for postgresql I figured this out with a lot of searching and finally found it in a reply on a issue for sqlx...
4. Is there a way to make all commands ephemeral outside of a specified channel like #bot-commands? Ideally staff members would have a way to bypass this to get public results.
5. How do I say who is and isn't allowed to change settings on a server? I'd like to make it so certain moderators are allowed to change settings, not just the server owner.
6. Is there a mode that allows any emoji to be an upvote?
update guilds set premium_end = '2040-01-01+00';
in pgsql, but this is hardly ideal.26 Replies
Also, I had to make this change in order to build the bot.

yeah that... I think something changed in a rust version that disallowed that typo
I'll fix it at some point
1 irrelevant now, I made is guild premium return true
I've basically got it working now, I think, would appreciate a look at the diff if you can think of any ways this might backfire: https://github.com/Efreak/Starboard-4/compare/CircuitSacul:Starboard-4:main...main
1. I see you figured out how to make a guild premium. If for some reason you want to increase the limits beyond that, you can do so by editing the constants.rs file
2. It allows things like using
star sql
. And that might be it tbh
4. No, you would have to change every response to be ephemeral, and do it based on the channel. That would be a lot of work. If you're ok with commands always being ephemeral, you can change the Context::raw_responsd
method to set the ephemeral flag. I can give more detail if you want to do this
5. Just do this with discord settings. You can go to server settings > integrations > starboard, and for the commands (maybe all at once?) add a role that can use the commands. By default, it's permission based. All the permission settings that are used by various commands are here
6. There are at least a few things that you would need to change:
- this method should always return Ok(true)
- replace this code with just let vote_type = VoteType::Upvote
looking at the diff now lolUgh. I didn't know discord even has command permissions, the entire integrations is unavailable on mobile
yeah looks like you got the premium stuff. Note that you can just disable the tasks pretty easily, you don't need to set the delays super high
Yeah, I think I removed those loops entirely as well
Yeah, I left the last one in for some reason. Dunno why. I did remove the two middle

Thanks much. Mostly just wanted to make sure I wouldn't hit any bugs with this, since I haven't looked at most of the code. I'm also running it in a limited user account instead of docker, but I figure that's on me if anything happens.
np. I didn't look too closely but if it compiles and runs, you're probably good to go
I don't have the resources to run docker tbh (<5gb free storage, and 500mb ram + 2gb swap lol)
hmm. running a docker image doesn't have very much overhead generally
Starboard's Stats
Total Servers: 23,891
Last Restart: <t:1696006932:R>
Cache
Cached Users: 8,712
Cached Members: 8,502
Cached Messages: 3,755
System Stats
CPU: 4% (10 cores)
Memory: 1.6 GB/18.9 GB
that's the stats for the entire vps
notice it's only use 1.6gb ram
at least 500mb of that is postgresql, and a good chunk is because I enabled debug logs
the rest is mostly cache, of which you won't have much
Yeah, but I've got a crapload of stuff running on my VPS. I need pretty much as slim as I can get it
fair enough
the downside is you have to compile on your vps
rather than just pulling and running the image
well you might be able to send the binaries to the vps if you can cross-compile, or if your personal machine and vps are the same target
idk how that works

And a good bit of my storage is actually cloud storage, because idgaf about latency. Rclone ftw.
I will note that if you direct anyone else to this, it does give a bunch of warnings about unused functions, but they don't seem to cause issues.
I suspect it's because you commented out a bunch of things, so they're no longer used
but yes warnings generally won't cause issues, they're just code-quality checks
(at leat in rust lol)
A few suggestions that take inspiration from websites (I don't need/want/am not requesting these, but they might be good for premium)
1. When different emoji are used: count each emoji, not just the total
2. Multiple starboards for different emoji (I'm not sure if this is possible with filters, I haven't actually looked)
3. A mode with different types of emojis than just up/down voting. Ie helpful/unhelpful, up/down vote, funny, etc. This is basically 1 and 2 in a single starboard
4. A demo server that allows premium functions and resets hourly. This server is a good demo, but doesn't show how easy/hard it is to set stuff up.
#2 is possible, all you have to do is create two starboards and use different emojis
in fact, you could have multiple starboards using the same emoji, and just different settings
👍
#3 is just a terminology difference, it seems kinda pointless to change that
#1 is not directly possible, although starboard "merging" is something that I might get around to at some point which would let you do something along those lines
you can already create multiple starboard that use the same channel. merging them would just combine their messages together, and show different
display-emojis
and different counts based on each one
#4 is an interesting idea, I might consider doing thatYeah, that's basically what I meant.
right now though I want to finish the dashboard
and between work and other projects that might take a while
really appreciate the suggestions though