Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Fix bug crashing bot when sending online/offline embeds - Swapped fro…
Browse files Browse the repository at this point in the history
…m using screaming snake case to pascal case for colors in embeds.

Final changes for guildbot v2.10.1
  • Loading branch information
emmaexe committed Jan 10, 2023
1 parent 5239238 commit b30c131
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "guildbot",
"version": "2.10.0",
"version": "2.10.1",
"description": "Discord bot for hypixel guilds. Offers automatic applications with in-game requirements, displaying guild and player statistics, a guild chat to discord two-way bridge and more.",
"author": "emmaexe",
"main": "server.js",
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ if (config.chatbridge.enabled) {
if (config.chatbridge.serverJoinLeaveMessages.enabled && serverJoin.test(message)) {
let name = message.slice(8, message.length-8)
let embed = new Discord.EmbedBuilder()
.setColor("GREEN")
.setColor("Green")
.setTitle(`**${name}** is now online.`)
let response = await fetch(`https://minecraft-api.com/api/uuid/${name}/json`)
let namedata = {uuid: undefined};
Expand All @@ -339,7 +339,7 @@ if (config.chatbridge.enabled) {
} else if (config.chatbridge.serverJoinLeaveMessages.enabled && serverLeave.test(message)) {
let name = message.slice(8, message.length-6)
let embed = new Discord.EmbedBuilder()
.setColor("RED")
.setColor("Red")
.setTitle(`**${name}** is now offline.`)
let response = await fetch(`https://minecraft-api.com/api/uuid/${name}/json`)
let namedata = {uuid: undefined};
Expand Down

0 comments on commit b30c131

Please sign in to comment.