diff --git a/commands/interaction/slash/utils/weather.js b/commands/interaction/slash/utils/weather.js index daae1c9..e95c50d 100644 --- a/commands/interaction/slash/utils/weather.js +++ b/commands/interaction/slash/utils/weather.js @@ -23,7 +23,7 @@ function temperature(value, units){ return `${Math.floor(modifiers[units](value))}${units}` } -function getUvIndex(value){ +function getUvIndex(i){ switch(i){ case i <= 2: return "uv_index_0" diff --git a/commands/message/dev/mapstest.js b/commands/message/dev/mapstest.js new file mode 100644 index 0000000..2e1363a --- /dev/null +++ b/commands/message/dev/mapstest.js @@ -0,0 +1,159 @@ +const { editOrReply } = require("#utils/message"); +const { Components } = require("detritus-client/lib/utils"); + +module.exports = { + label: "text", + name: "mapstest", + metadata: { + description: 'speak.', + description_short: 'speak', + examples: ['say hug'], + category: 'dev', + usage: 'say ' + }, + onBefore: context => context.user.isClientOwner, + onCancel: ()=>{}, + run: async (context, args) => { + await context.triggerTyping(); + + let component = new Components(); + + let row0 = component.addActionRow({ + custom_id: "r0" + }); + row0.addButton({ + custom_id: "s00", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + row0.addButton({ + custom_id: "s01", + disabled: false, + emoji: "<:up:1264344081572565102>", + style: 1 + }) + + row0.addButton({ + custom_id: "s02", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + row0.addButton({ + custom_id: "s03", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + row0.addButton({ + custom_id: "s04", + disabled: true, + emoji: "<:ico_door_white:1264348023916466176>", + style: 4 + }) + + + row0.addButton({ + custom_id: "s10", + disabled: false, + emoji: "<:left:1264344064103284846>", + style: 1 + }) + + row0.addButton({ + custom_id: "s11", + disabled: false, + emoji: "<:ico_pegman_down:1264344115785502802>", + style: 3 + }) + + row0.addButton({ + custom_id: "s12", + disabled: false, + emoji: "<:right:1264344072257015830>", + style: 1 + }) + + + + row0.addButton({ + custom_id: "s13", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + row0.addButton({ + custom_id: "s14", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + + row0.addButton({ + custom_id: "s20", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + row0.addButton({ + custom_id: "s21", + disabled: false, + emoji: "<:down:1264344051751059479>", + style: 1 + }) + + row0.addButton({ + custom_id: "s22", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + + row0.addButton({ + custom_id: "s23", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + row0.addButton({ + custom_id: "s24", + disabled: true, + emoji: "<:empty:749601069298090034>", + style: 2 + }) + + + + console.log(JSON.stringify(component)) + + editOrReply(context, { + embeds: [ + { + author: { + name: "New York Stock Exchange, NYC", + iconUrl: "https://bignutty.gitlab.io/webstorage4/v2/assets/brands/maps.png" + }, + image: { + url: "https://cdn.discordapp.com/attachments/415951527258095616/1264345049215275080/9k.png?ex=669d8896&is=669c3716&hm=a3f0a1b025fd75f47e144e7a9e3161242634dfcd1d76825f1e82deeb0269f30a&" + } + } + ], + components: component + }) + } +}; \ No newline at end of file