This commit is contained in:
2021-07-11 19:24:30 -05:00
parent 9b83148551
commit f668a91eb1
2 changed files with 123 additions and 119 deletions

View File

@@ -1,8 +1,9 @@
import { MessageActionRow, MessageButton, MessageComponent, MessageMenu, MessageMenuOption } from "discord-buttons";
import { Message } from "discord.js";
import { TextChannel } from "discord.js";
import * as Opt from "../types/Opt";
import InteractionRoles from "./data";
//initialize discord
const Discord = require('discord.js'),
client = new Discord.Client({ ws: { intents: Discord.Intents.ALL } }),
@@ -12,124 +13,6 @@ disbut(client); //configure discord-buttons with client
//on read
client.on('ready', () => console.log('ready'));
//array of Opt.Row|Opt.Menu, each one is a message that will be sent/understood
// - types/Opt.d.ts
const InteractionRoles: (Opt.Row|Opt.Menu)[] = [
{
type: 'menu',
message: 'Pronouns',
palceholder: '',
id: 'rolemenu',
max: 'all',
options: [
{
label: 'They/Them',
val: 'they',
roleid: '861453442387279872'
},
{
label: 'He/Him',
val: 'he',
roleid: '861453443188129872'
},
{
label: 'She/Her',
val: 'she',
roleid: '861453442777219112'
},
{
label: 'It/Its',
val: 'it',
roleid: '862687464543223809'
},
{
label: 'Fae/Faer',
val: 'fae',
roleid: '862687559464386601'
},
{
label: 'Any',
val: 'any',
roleid: '861453441422983169'
}
]
},
{
type: 'menu',
message: 'Role Color',
palceholder: '',
id: 'colormenu',
max: 1,
options: [
{
label: 'red',
val: 'red',
roleid: '863621755774959626'
},
{
label: 'pink',
val: 'pink',
roleid: '863621801191931904'
},
{
label: 'orange',
val: 'orange',
roleid: '863621849153273876'
},
{
label: 'green',
val: 'green',
roleid: '863621885366894592'
},
{
label: 'mint green',
val: 'mint green',
roleid: '863622000512860190'
},
{
label: 'blue',
val: 'blue',
roleid: '863622336573079603'
},
{
label: 'light blue',
val: 'light blue',
roleid: '863622365316513793'
},
{
label: 'periwinkle',
val: 'periwinkle',
roleid: '863622403775266816'
},
{
label: 'purple',
val: 'purple',
roleid: '863622442790682674'
},
{
label: 'blank',
val: 'blank',
roleid: '',
default: true
}
]
},
{
type: 'menu',
message: 'Other Roles',
palceholder: '',
id: 'otherrolesmenu',
max: 'all',
options: [
{
label: 'Movie Night',
val: 'movie',
roleid: '862883242436591617'
}
]
}
];
/**
* send message containing menu
* @param c text channel to send message