-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Chiissu/dev
0.2.0
- Loading branch information
Showing
50 changed files
with
715 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/ | ||
.env | ||
.DS_Store | ||
data.db | ||
data.db | ||
bun.lockb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,11 @@ import { | |
SlashCommandBuilder, | ||
type ChatInputCommandInteraction | ||
} from "discord.js"; | ||
import { version } from "../../package.json"; | ||
import { genColor } from "../utils/colorGen"; | ||
import { imageColor } from "../utils/imageColor"; | ||
import { randomise } from "../utils/randomise"; | ||
import { pluralOrNot } from "../utils/pluralOrNot"; | ||
import { replace } from "../utils/replace"; | ||
|
||
export default class About { | ||
data: SlashCommandBuilder; | ||
|
@@ -25,8 +27,6 @@ export default class About { | |
const members = guilds.map(guild => guild.memberCount).reduce((a, b) => a + b); | ||
const shards = client.shard?.count; | ||
const avatar = user.displayAvatarURL(); | ||
let emojis = ["💖", "💝", "💓", "💗", "💘", "💟", "💕", "💞"]; | ||
if (Math.round(Math.random() * 100) <= 5) emojis = ["⌨️", "💻", "🖥️"]; | ||
|
||
const embed = new EmbedBuilder() | ||
.setAuthor({ name: "• About Sokora", iconURL: avatar }) | ||
|
@@ -37,35 +37,30 @@ export default class About { | |
{ | ||
name: "📃 • General", | ||
value: [ | ||
"Version **0.1.1**, *Kaishi*", | ||
`**${members}** members • **${guilds.size}** guild${guilds.size == 1 ? "" : "s"} ${ | ||
!shards ? "" : `• **${shards}** shard${shards == 1 ? "" : "s"}` | ||
`Version **${version}**, *Kaishi*`, | ||
`**${members}** ${pluralOrNot("member", members)} • **${guilds.size}** ${pluralOrNot("guild", guilds.size)} ${ | ||
!shards ? "" : `• **${shards}** ${pluralOrNot("shard", shards)}` | ||
}` | ||
].join("\n") | ||
}, | ||
{ | ||
name: "🌌 • Entities involved", | ||
name: "🔗 • Links", | ||
value: [ | ||
"**Founder**: Goos", | ||
"**Developers**: Dimkauzh, Froxcey, Golem64, Koslz, MQuery, Nikkerudon, Spectrum, ThatBOI", | ||
"**Designers**: ArtyH, ZakaHaceCosas, Pjanda", | ||
"**Translator Lead**: ThatBOI", | ||
"**Translators**: Dimkauzh, flojo, Golem64, GraczNet, Nikkerudon, ZakaHaceCosas, SaFire, TrulyBlue", | ||
"**Testers**: Blaze, fishy, Trynera", | ||
"And **YOU**, for using Sokora." | ||
"[Discord](https://discord.gg/c6C25P4BuY) • [GitHub](https://www.github.com/SokoraDesu) • [YouTube](https://www.youtube.com/@SokoraDesu) • [Instagram](https://instagram.com/NebulaTheBot) • [Mastodon](https://mastodon.online/@[email protected]) • [Matrix](https://matrix.to/#/#sokora:matrix.org) • [Revolt](https://rvlt.gg/28TS9aXy)", | ||
"Also, please read the [ToS](https://sokora.org/terms) and the [privacy policy](https://sokora.org/privacy)." | ||
].join("\n") | ||
}, | ||
{ | ||
name: "🔗 • Links", | ||
value: | ||
"[GitHub](https://www.github.com/SokoraDesu) • [YouTube](https://www.youtube.com/@SokoraDesu) • [Instagram](https://instagram.com/NebulaTheBot) • [Mastodon](https://mastodon.online/@[email protected]) • [Revolt](https://rvlt.gg/28TS9aXy)" | ||
} | ||
) | ||
.setFooter({ text: `Made with ${randomise(emojis)} by the Sokora team` }) | ||
.setFooter({ text: replace("(madeWith)") }) | ||
.setThumbnail(avatar) | ||
.setColor(user.hexAccentColor ?? (await imageColor(undefined, avatar)) ?? genColor(270)); | ||
|
||
const row = new ActionRowBuilder<ButtonBuilder>().addComponents( | ||
new ButtonBuilder() | ||
.setLabel("• Vote") | ||
.setURL("https://top.gg/bot/873918300726394960/vote") | ||
.setEmoji("🗳️") | ||
.setStyle(ButtonStyle.Link), | ||
new ButtonBuilder() | ||
.setLabel("• Donate") | ||
.setURL("https://paypal.me/SokoraTheBot") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { EmbedBuilder, SlashCommandBuilder, type ChatInputCommandInteraction } from "discord.js"; | ||
import { version } from "../../package.json"; | ||
import { genColor } from "../utils/colorGen"; | ||
import { imageColor } from "../utils/imageColor"; | ||
import { replace } from "../utils/replace"; | ||
|
||
export default class Changelog { | ||
data: SlashCommandBuilder; | ||
constructor() { | ||
this.data = new SlashCommandBuilder() | ||
.setName("changelog") | ||
.setDescription("Shows the changelog of Sokora's most recent update."); | ||
} | ||
|
||
async run(interaction: ChatInputCommandInteraction) { | ||
const user = interaction.client.user; | ||
const avatar = user.displayAvatarURL(); | ||
const text = [ | ||
["## Added", "### Commands", "- /changelog", "- /credits", "- /moderation notes"].join("\n"), | ||
[ | ||
"## Changed", | ||
"- The bot will remove levels when an admin changed the leveling difficulty", | ||
"- /leaderboard shows 6 users per page instead of 5", | ||
"- When you add the bot, it sends a message in the system channel", | ||
"- Remade the message logs", | ||
" - Edit logs will let you jump to the message that got edited" | ||
].join("\n"), | ||
[ | ||
"### /settings", | ||
"- Autocompletes with channels/users/roles (you don't have to copy IDs now :tada:)", | ||
"- In the embed it will show links to channels/users/roles instead of showing IDs" | ||
].join("\n"), | ||
[ | ||
"### /about", | ||
"- Vote button added", | ||
"- Removed credits and put them in a different command to reduce the height of the embed" | ||
].join("\n"), | ||
[ | ||
"## Fixed", | ||
"### News", | ||
"- Major issue related to the database, where the guild wasn't provided to ensure that news would be unique to every server, **thank you @Golem642!!!!**", | ||
"- /news edit's modal errored when sending" | ||
].join("\n"), | ||
[ | ||
"### Moderation commands", | ||
"- /moderation clear removed one more message than the user provided", | ||
'- /moderation unban errored internally (it should send an error embed) when the user didn\'t have the "Ban Members" permission' | ||
].join("\n"), | ||
[ | ||
"## Typos", | ||
'- "warn" mentions in /moderation warn are now "warning" to be more consistent', | ||
"- Removed old markdown remnants from /moderation slowdown" | ||
].join("\n") | ||
].join("\n"); | ||
|
||
const embed = new EmbedBuilder() | ||
.setAuthor({ name: `• Changelog for ${version}`, iconURL: avatar }) | ||
.setDescription(text) | ||
.setFooter({ text: replace("(madeWith)") }) | ||
.setThumbnail(avatar) | ||
.setColor(user.hexAccentColor ?? (await imageColor(undefined, avatar)) ?? genColor(270)); | ||
|
||
await interaction.reply({ embeds: [embed] }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { EmbedBuilder, SlashCommandBuilder, type ChatInputCommandInteraction } from "discord.js"; | ||
import { genColor } from "../utils/colorGen"; | ||
import { imageColor } from "../utils/imageColor"; | ||
import { replace } from "../utils/replace"; | ||
|
||
export default class Credits { | ||
data: SlashCommandBuilder; | ||
constructor() { | ||
this.data = new SlashCommandBuilder() | ||
.setName("credits") | ||
.setDescription("Shows everyone who worked on Sokora."); | ||
} | ||
|
||
async run(interaction: ChatInputCommandInteraction) { | ||
const user = interaction.client.user; | ||
const avatar = user.displayAvatarURL(); | ||
const embed = new EmbedBuilder() | ||
.setAuthor({ name: "• Entities involved", iconURL: avatar }) | ||
.setDescription( | ||
[ | ||
"**Founder**: Goos", | ||
"**Developers**: Dimkauzh, Froxcey, Golem64, Koslz, Littie, MQuery, Nikkerudon, Spectrum, ThatBOI", | ||
"**Designers**: ArtyH, ZakaHaceCosas, Pjanda", | ||
"**Translator Lead**: ThatBOI", | ||
"**Translators**: Dimkauzh, flojo, Golem64, GraczNet, Nikkerudon, ZakaHaceCosas, SaFire, TrulyBlue", | ||
"**Testers**: Blaze, fishy, Trynera" | ||
].join("\n") | ||
) | ||
.setFooter({ text: replace("(madeWith)") }) | ||
.setThumbnail(avatar) | ||
.setColor(user.hexAccentColor ?? (await imageColor(undefined, avatar)) ?? genColor(270)); | ||
|
||
await interaction.reply({ embeds: [embed] }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.