mirror of
https://github.com/cassoule/flopobot_v2.git
synced 2026-01-18 16:37:40 +01:00
update lets to consts
This commit is contained in:
@@ -13,9 +13,9 @@ async function HasGuildCommand(client, appId, guildId, command) {
|
||||
const url = DiscordAPI(`applications/${appId}/guilds/${guildId}/commands`);
|
||||
|
||||
try {
|
||||
let { data } = await client({ url, method: 'get'});
|
||||
const { data } = await client({ url, method: 'get'});
|
||||
if (data) {
|
||||
let installedNames = data.map((c) => c["name"]);
|
||||
const installedNames = data.map((c) => c["name"]);
|
||||
// This is just matching on the name, so it's not good for updates
|
||||
if (!installedNames.includes(command["name"])) {
|
||||
await InstallGuildCommand(client, appId, guildId, command);
|
||||
@@ -38,8 +38,8 @@ export async function InstallGuildCommand(client, appId, guildId, command) {
|
||||
|
||||
// Get the game choices from game.js
|
||||
function createCommandChoices() {
|
||||
let choices = getRPSChoices();
|
||||
let commandChoices = [];
|
||||
const choices = getRPSChoices();
|
||||
const commandChoices = [];
|
||||
|
||||
for (let choice of choices) {
|
||||
commandChoices.push({
|
||||
|
||||
Reference in New Issue
Block a user