Allow member who invited Muse to do initial setup (#561)

This commit is contained in:
Max Isom 2022-03-12 18:41:53 -05:00 committed by GitHub
parent e1589c3013
commit 20eaed4a16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 4 deletions

View file

@ -26,6 +26,15 @@ const updatePermissionsForGuild = async (guild: Guild) => {
permission: false,
},
];
if (settings.invitedByUserId) {
permissions.push({
id: settings.invitedByUserId,
type: 'USER',
permission: true,
});
}
const commands = await guild.commands.fetch();
await guild.commands.permissions.set({fullPermissions: commands.map(command => ({