async execute() {
    super.execute();

    const discordClient = this.processor.discordClient;
    this.assertNotNull(discordClient);
    const user = discordClient.user;
    this.assertNotNull(user);
    const guild = discordClient.guilds.cache.get(this.processor.prefsManager.test_discord_guild_id);
    this.assertNotNull(guild);
    const channel = guild.channels.cache.get(this.processor.prefsManager.test_discord_text_channel_1_id);
    this.assertNotNull(channel);

    channel.send('!permitremind <@!' + user.id + '>');
    let receivedMessage = await this.getReply(channel);
    this.assertNotNull(receivedMessage);
    this.assertEquals(receivedMessage.content, 'Successfully added the permission.');

    channel.send('!reminders');
    let receivedMessages = await this.getAllReplies(channel);
    this.assertNotNull(receivedMessages);
    let totalText = '';
    for (const message of receivedMessages) {
      this.assertNotNull(message.content);
      totalText += message.content;
    }
    const remindersArrayStartLength = totalText.split('\n').length;

    channel.send('!remind in 3s e2e test');
    receivedMessage = await this.getReply(channel);
    this.assertNotNull(receivedMessage);
    this.assertTrue(receivedMessage.content
      .indexOf('The following reminder was successfully added and scheduled:') >= 0);

    receivedMessage = await this.getReply(channel, 4000);
    this.assertNotNull(receivedMessage);
    this.assertEquals(receivedMessage.content, 'e2e test');

    channel.send('!reminders');
    receivedMessages = await this.getAllReplies(channel);
    this.assertNotNull(receivedMessages);
    totalText = '';
    for (const message of receivedMessages) {
      this.assertNotNull(message.content);
      totalText += message.content;
    }
    const remindersArrayEndLength = totalText.split('\n').length;

    channel.send('!denyremind <@!' + user.id + '>');
    receivedMessage = await this.getReply(channel);
    this.assertNotNull(receivedMessage);
    this.assertEquals(receivedMessage.content, 'Successfully removed 1 permission(s).');

    this.assertEquals(remindersArrayStartLength, remindersArrayEndLength);
  }
/**
   * Executes the test case
   * @return {Promise} nothing (in case of failure - an exception will be thrown)
   */
Executes the test case
@return {Promise} nothing (in case of failure - an exception will be thrown)
Executes the test case @return { Promise } nothing ( in case of failure - an exception will be thrown )
async execute() {
    super.execute();
    const discordClient = this.processor.discordClient;
    this.assertNotNull(discordClient);
    const user = discordClient.user;
    this.assertNotNull(user);
    const guild = discordClient.guilds.cache.get(this.processor.prefsManager.test_discord_guild_id);
    this.assertNotNull(guild);
    const channel = guild.channels.cache.get(this.processor.prefsManager.test_discord_text_channel_1_id);
    this.assertNotNull(channel);
    channel.send('!permitremind <@!' + user.id + '>');
    let receivedMessage = await this.getReply(channel);
    this.assertNotNull(receivedMessage);
    this.assertEquals(receivedMessage.content, 'Successfully added the permission.');
    channel.send('!reminders');
    let receivedMessages = await this.getAllReplies(channel);
    this.assertNotNull(receivedMessages);
    let totalText = '';
    for (const message of receivedMessages) {
      this.assertNotNull(message.content);
      totalText += message.content;
    }
    const remindersArrayStartLength = totalText.split('\n').length;
    channel.send('!remind in 3s e2e test');
    receivedMessage = await this.getReply(channel);
    this.assertNotNull(receivedMessage);
    this.assertTrue(receivedMessage.content
      .indexOf('The following reminder was successfully added and scheduled:') >= 0);
    receivedMessage = await this.getReply(channel, 4000);
    this.assertNotNull(receivedMessage);
    this.assertEquals(receivedMessage.content, 'e2e test');
    channel.send('!reminders');
    receivedMessages = await this.getAllReplies(channel);
    this.assertNotNull(receivedMessages);
    totalText = '';
    for (const message of receivedMessages) {
      this.assertNotNull(message.content);
      totalText += message.content;
    }
    const remindersArrayEndLength = totalText.split('\n').length;
    channel.send('!denyremind <@!' + user.id + '>');
    receivedMessage = await this.getReply(channel);
    this.assertNotNull(receivedMessage);
    this.assertEquals(receivedMessage.content, 'Successfully removed 1 permission(s).');
    this.assertEquals(remindersArrayStartLength, remindersArrayEndLength);
  }
async execute ( ) { super . execute ( ) ; const discordClient = this . processor . discordClient ; this . assertNotNull ( discordClient ) ; const user = discordClient . user ; this . assertNotNull ( user ) ; const guild = discordClient . guilds . cache . get ( this . processor . prefsManager . test_discord_guild_id ) ; this . assertNotNull ( guild ) ; const channel = guild . channels . cache . get ( this . processor . prefsManager . test_discord_text_channel_1_id ) ; this . assertNotNull ( channel ) ; channel . send ( '!permitremind <@!' + user . id + '>' ) ; let receivedMessage = await this . getReply ( channel ) ; this . assertNotNull ( receivedMessage ) ; this . assertEquals ( receivedMessage . content , 'Successfully added the permission.' ) ; channel . send ( '!reminders' ) ; let receivedMessages = await this . getAllReplies ( channel ) ; this . assertNotNull ( receivedMessages ) ; let totalText = '' ; for ( const message of receivedMessages ) { this . assertNotNull ( message . content ) ; totalText += message . content ; } const remindersArrayStartLength = totalText . split ( '\n' ) . length ; channel . send ( '!remind in 3s e2e test' ) ; receivedMessage = await this . getReply ( channel ) ; this . assertNotNull ( receivedMessage ) ; this . assertTrue ( receivedMessage . content . indexOf ( 'The following reminder was successfully added and scheduled:' ) >= 0 ) ; receivedMessage = await this . getReply ( channel , 4000 ) ; this . assertNotNull ( receivedMessage ) ; this . assertEquals ( receivedMessage . content , 'e2e test' ) ; channel . send ( '!reminders' ) ; receivedMessages = await this . getAllReplies ( channel ) ; this . assertNotNull ( receivedMessages ) ; totalText = '' ; for ( const message of receivedMessages ) { this . assertNotNull ( message . content ) ; totalText += message . content ; } const remindersArrayEndLength = totalText . split ( '\n' ) . length ; channel . send ( '!denyremind <@!' + user . id + '>' ) ; receivedMessage = await this . getReply ( channel ) ; this . assertNotNull ( receivedMessage ) ; this . assertEquals ( receivedMessage . content , 'Successfully removed 1 permission(s).' ) ; this . assertEquals ( remindersArrayStartLength , remindersArrayEndLength ) ; }
Executes the test case
 @return {Promise} nothing (in case of failure - an exception will be thrown)
Executes the test case @return { Promise } nothing ( in case of failure - an exception will be thrown )