users are now renamed after joining the discord server

This commit is contained in:
Sarah Faey 2022-11-21 23:05:10 +01:00
parent 601bd10c39
commit 17d8983fb0
4 changed files with 74 additions and 0 deletions

View file

@ -18,6 +18,7 @@ namespace DiscordBot
private readonly ButtonHandler _buttonHandler;
private readonly SelectMenuHandler _selectMenuHandler;
private readonly ModalHandler _modalHandler;
private readonly UserHandler _userHandler;
// Retrieve client and CommandService instance via ctor
public CommandHandler(DiscordSocketClient client, CommandService commands, HttpService httpService)
@ -29,6 +30,7 @@ namespace DiscordBot
_buttonHandler = new ButtonHandler(_httpService);
_selectMenuHandler = new SelectMenuHandler(_httpService);
_modalHandler = new ModalHandler(_client, _httpService);
_userHandler = new UserHandler(_client, _httpService);
}
public async Task InstallCommandsAsync()
@ -37,6 +39,7 @@ namespace DiscordBot
_client.ButtonExecuted += _buttonHandler.Handler;
_client.SelectMenuExecuted += _selectMenuHandler.Handler;
_client.ModalSubmitted += _modalHandler.Handler;
_client.UserJoined += _userHandler.HandleUserJoined;
}
}
}