Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
feat: Fix MessageButton being wacky
Browse files Browse the repository at this point in the history
  • Loading branch information
minotaa committed Jul 15, 2021
1 parent ec1266b commit f80378d
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"canvas-constructor": "3.2.0",
"chalk": "^4.1.1",
"dblapi.js": "^2.4.1",
"discord.js": "^13.0.0-dev.03d3a5cdde5492433d27bbfe46afe0ebf2de5904",
"discord.js": "^13.0.0-dev.4206e35.1626350625",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"moment": "^2.29.1",
Expand Down
8 changes: 4 additions & 4 deletions src/commands/Economy/farm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ class FarmCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Tomato')
.setCustomID('tomato')
.setCustomId('tomato')
.setEmoji('🍅')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Corn')
.setCustomID('corn')
.setCustomId('corn')
.setEmoji('🌽')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Carrot')
.setCustomID('carrot')
.setCustomId('carrot')
.setEmoji('🥕')
.setStyle('SECONDARY'),
)
Expand Down Expand Up @@ -201,7 +201,7 @@ class FarmCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Farm again?')
.setCustomID('farm')
.setCustomId('farm')
.setEmoji('🌱')
.setStyle('SECONDARY'),
)
Expand Down
8 changes: 4 additions & 4 deletions src/commands/Economy/fish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ class FishCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Ocean')
.setCustomID('ocean')
.setCustomId('ocean')
.setEmoji('🌊')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Lake')
.setCustomID('lake')
.setCustomId('lake')
.setEmoji('🏞️')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Ice Pond')
.setCustomID('ice_pond')
.setCustomId('ice_pond')
.setEmoji('❄️')
.setStyle('SECONDARY'),
)
Expand Down Expand Up @@ -201,7 +201,7 @@ class FishCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Fish again?')
.setCustomID('fish')
.setCustomId('fish')
.setEmoji('🎣')
.setStyle('SECONDARY'),
)
Expand Down
8 changes: 4 additions & 4 deletions src/commands/Economy/hunt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ class HuntCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Rabbit')
.setCustomID('rabbit')
.setCustomId('rabbit')
.setEmoji('🐰')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Pig')
.setCustomID('pig')
.setCustomId('pig')
.setEmoji('🐷')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Deer')
.setCustomID('deer')
.setCustomId('deer')
.setEmoji('🦌')
.setStyle('SECONDARY'),
)
Expand Down Expand Up @@ -202,7 +202,7 @@ class HuntCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Hunt again?')
.setCustomID('hunt')
.setCustomId('hunt')
.setEmoji('🐇')
.setStyle('SECONDARY'),
)
Expand Down
8 changes: 4 additions & 4 deletions src/commands/Economy/inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ class InventoryCommand extends Command {
new MessageButton()
.setStyle('SECONDARY')
.setEmoji('⬅️')
.setCustomID('previous'),
.setCustomId('previous'),
new MessageButton()
.setStyle('SECONDARY')
.setEmoji('➡️')
.setCustomID('next')
.setCustomId('next')
)
message.awaitMessageComponentInteraction(filter, { time: 30000 })
.then(async i => {
Expand Down Expand Up @@ -107,11 +107,11 @@ class InventoryCommand extends Command {
new MessageButton()
.setStyle('SECONDARY')
.setEmoji('⬅️')
.setCustomID('previous'),
.setCustomId('previous'),
new MessageButton()
.setStyle('SECONDARY')
.setEmoji('➡️')
.setCustomID('next')
.setCustomId('next')
)
const message = await msg.reply({ embeds: [embed], components: [row] })
const filter = i => {
Expand Down
8 changes: 4 additions & 4 deletions src/commands/Economy/mine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,17 @@ class MineCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('River')
.setCustomID('river')
.setCustomId('river')
.setEmoji('🌊')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Mountains')
.setCustomID('mountains')
.setCustomId('mountains')
.setEmoji('🏔️')
.setStyle('SECONDARY'),
new MessageButton()
.setLabel('Caverns')
.setCustomID('caverns')
.setCustomId('caverns')
.setEmoji('🪨')
.setStyle('SECONDARY'),
)
Expand Down Expand Up @@ -195,7 +195,7 @@ class MineCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Mine again?')
.setCustomID('mine')
.setCustomId('mine')
.setEmoji('⛏️')
.setStyle('SECONDARY'),
)
Expand Down
2 changes: 1 addition & 1 deletion src/commands/Economy/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class StartCommand extends Command {
.addComponents(
new MessageButton()
.setLabel('Fish')
.setCustomID('fish')
.setCustomId('fish')
.setEmoji('🎣')
.setStyle('SECONDARY'),
)
Expand Down
56 changes: 34 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
resolved "https://registry.yarnpkg.com/@aero/centra/-/centra-1.0.6.tgz#0151359a4c6a9054d36fa6c31353b2fd3d860e6f"
integrity sha512-e7sUh/VjugT8LsHb4/hcbmhaVVi9deWWPQnlMnU0RAnF8+iCdGdCcKvoHnDNl/ELykwjpbKpBYbWPx0yKZaDpw==

"@discordjs/builders@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-0.2.0.tgz#832c8d894aad13362db7a99f11a7826b21e4cd94"
integrity sha512-TVq7NZBCJrrTRc3CfxOr3IdgY5nrtqVxZ7qDUF1mN6LgxIiOldmFxsSwMrQBzLFVmOwqFyNLKCeblley8UpEuw==
dependencies:
discord-api-types "^0.18.1"
tslib "^2.3.0"

"@discordjs/collection@^0.1.6":
version "0.1.6"
resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.1.6.tgz#9e9a7637f4e4e0688fd8b2b5c63133c91607682c"
Expand Down Expand Up @@ -36,10 +44,10 @@
semver "^7.3.4"
tar "^6.1.0"

"@sapphire/async-queue@^1.1.2":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.3.tgz#fbc70f2687a2473bd824a4723e962dfce933eba7"
integrity sha512-pyV+0njfBq6rHKEOpux5xy2cEM5u9KFjVzpmKsgk/8mdslLCuNXX4QvxWsSerLq/EtLhkvvl998cdFbGtpHa9Q==
"@sapphire/async-queue@^1.1.4":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.4.tgz#ae431310917a8880961cebe8e59df6ffa40f2957"
integrity sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==

"@tsconfig/node10@^1.0.7":
version "1.0.8"
Expand Down Expand Up @@ -91,13 +99,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.12.5.tgz#9a78318a45d75c9523d2396131bd3cca54b2d185"
integrity sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg==

"@types/ws@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.4.tgz#93e1e00824c1de2608c30e6de4303ab3b4c0c9bc"
integrity sha512-d/7W23JAXPodQNbOZNXvl2K+bqAQrCMwlh/nuQsPSQk6Fq0opHoPrUw43aHsvSbIiQPr8Of2hkFbnz1XBFVyZQ==
dependencies:
"@types/node" "*"

"@types/ws@^7.4.5":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.5.tgz#8ff0f7efcd8fea19f51f9dd66cb8b498d172a752"
Expand Down Expand Up @@ -450,24 +451,30 @@ diff@^4.0.1:
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==

discord-api-types@^0.18.1:
version "0.18.1"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.18.1.tgz#5d08ed1263236be9c21a22065d0e6b51f790f492"
integrity sha512-hNC38R9ZF4uaujaZQtQfm5CdQO58uhdkoHQAVvMfIL0LgOSZeW575W8H6upngQOuoxWd8tiRII3LLJm9zuQKYg==

discord-api-types@^0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e:
version "0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e.tgz#d5f36f5712ec8fe2fe928b5c37618c94a3969d6a"
integrity sha512-ttRA/8e/WKHDbGFfED5WlS7gID+kalmNr6iMiWBCvkphQ7kFHiTOVbnj/zX9ksaRaYXp/I38SCQ+qZvLu8DJZg==

discord.js@^13.0.0-dev.03d3a5cdde5492433d27bbfe46afe0ebf2de5904:
version "13.0.0-dev.03d3a5cdde5492433d27bbfe46afe0ebf2de5904"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.0.0-dev.03d3a5cdde5492433d27bbfe46afe0ebf2de5904.tgz#b3a492e27cc70cfd47a6d0dc2708d21a5e165a1f"
integrity sha512-ZKIkMw0KboEm/W70d7pYOqnGYm9Gsf83gl4lKfbKtYRERw5Ud/9YmK88Tx/h1sBvk4OoY7Q9c4HZPzXYekuwtQ==
discord.js@^13.0.0-dev.4206e35.1626350625:
version "13.0.0-dev.4206e35.1626350625"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.0.0-dev.4206e35.1626350625.tgz#e03baa68a09053fd382ad50879536b6895317767"
integrity sha512-gnWp8MSZZq4fItRIYgP8ZEh7Tlk0Rr8kUW71TNvFzmiibkbgCmpOvhqayw2mApJE8XXzHnyZ97vhiux6nlhiBw==
dependencies:
"@discordjs/builders" "^0.2.0"
"@discordjs/collection" "^0.1.6"
"@discordjs/form-data" "^3.0.1"
"@sapphire/async-queue" "^1.1.2"
"@types/ws" "^7.4.4"
"@sapphire/async-queue" "^1.1.4"
"@types/ws" "^7.4.5"
abort-controller "^3.0.0"
discord-api-types "^0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e"
node-fetch "^2.6.1"
ws "^7.4.6"
ws "^7.5.1"

dotenv@^10.0.0:
version "10.0.0"
Expand Down Expand Up @@ -1382,6 +1389,11 @@ ts-node@^10.1.0:
source-map-support "^0.5.17"
yn "3.1.1"

tslib@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==

tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
Expand Down Expand Up @@ -1446,10 +1458,10 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=

ws@^7.4.6:
version "7.5.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.0.tgz#0033bafea031fb9df041b2026fc72a571ca44691"
integrity sha512-6ezXvzOZupqKj4jUqbQ9tXuJNo+BR2gU8fFRk3XCP3e0G6WT414u5ELe6Y0vtp7kmSJ3F7YWObSNr1ESsgi4vw==
ws@^7.5.1:
version "7.5.3"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74"
integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==

yallist@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit f80378d

Please sign in to comment.