Esempio n. 1
0
        private async Task Game_GameEnded(AmongUsGame sender, GameEndAsyncEventArgs e)
        {
            if (this.GameManager.VoiceChannel != 0ul)
            {
                await this.DiscordBot.UnmuteAllAsync(this.GameManager.VoiceChannel);
            }

            var chn = this.GameManager.TextChannel;

            if (chn == 0ul)
            {
                return;
            }

            await this.DiscordBot.SendMessageAsync(chn, "Game ended");
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a payload from event args.
 /// </summary>
 /// <param name="e">Event args to construct from.</param>
 /// <returns>Constructed event payload.</returns>
 public static ProbeGameEndEventPayload FromEventArgs(GameEndAsyncEventArgs e)
 => new ProbeGameEndEventPayload();
 private async Task Game_GameEnded(AmongUsGame sender, GameEndAsyncEventArgs e)
 => await this.Comms.SendEventAsync(new ProbeEvent(ProbeEventType.GameEnd, ProbeGameEndEventPayload.FromEventArgs(e)));