internal async Task JoinAsync(UserJoinedEventArgs args) { var data = _db.GetData(args.Guild); if (data.Configuration.Welcome.WelcomeMessage.IsNullOrEmpty()) { return; //we don't want to send an empty join message } if (!data.Configuration.Welcome.WelcomeDmMessage.IsNullOrEmpty()) { _ = await args.User.TrySendMessageAsync(data.Configuration.Welcome.FormatDmMessage(args.User)); } _logger.Debug(LogSource.Volte, "User joined a guild, let's check to see if we should send a welcome embed."); var welcomeMessage = data.Configuration.Welcome.FormatWelcomeMessage(args.User); var c = args.Guild.GetTextChannel(data.Configuration.Welcome.WelcomeChannel); if (!(c is null)) { await new EmbedBuilder() .WithColor(data.Configuration.Welcome.WelcomeColor) .WithDescription(welcomeMessage) .WithThumbnailUrl(args.User.GetAvatarUrl()) .WithCurrentTimestamp() .SendToAsync(c); _logger.Debug(LogSource.Volte, $"Sent a welcome embed to #{c.Name}."); return; } _logger.Debug(LogSource.Volte, "WelcomeChannel config value resulted in an invalid/nonexistent channel; aborting."); }
void client_UserJoined(object sender, UserJoinedEventArgs e) { if (!(e.User.Equals(nick))) { if (elnotif) { cw.AddToChatWindow(6, e.User, " has joined the channel."); } addUserToList(e.User); } }
// Get the name of the user who joined the channel void OnUserJoined(UserJoinedEventArgs userJoinedArgs) { if (debugLogChannelMessages) { UnityEngine.Debug.Log("IpcIrcDebug: USER JOINED: " + userJoinedArgs.User); } if (debugEchoChannelMessages) { IpcIrc.Instance.Message("IpcIrcDebug: USER JOINED: " + userJoinedArgs.User); } }
// Get the name of the user who joined the channel void OnUserJoined(UserJoinedEventArgs userJoinedArgs) { if (debugLogChannelMessages) { UnityEngine.Debug.Log("IpcIrc: LordHelix: WATCHED POKEMON JOIN: " + userJoinedArgs.User); } if (debugEchoChannelMessages) { IpcIrc.Instance.Message("IpcIrc:LordHelix: WATCHED POKEMON JOIN: " + userJoinedArgs.User); } Debug.Log("IpcIrc:LordHelix: WATCHED USER JOIN: " + userJoinedArgs.User); }
// Get the name of the user who joined the channel void OnUserJoined(UserJoinedEventArgs userJoinedArgs) { if (debugLogChannelMessages) { UnityEngine.Debug.Log("IpcIrc: JohnConnor: WATCHED TERMINATOR JOIN: " + userJoinedArgs.User); } if (debugEchoChannelMessages) { IpcIrc.Instance.Message("IpcIrc:JohnConnor: WATCHED TERMINATOR JOIN: " + userJoinedArgs.User); } Debug.Log("IpcIrc:JohnConnor: WATCHED USER JOIN: " + userJoinedArgs.User); }
private async Task ApplyRoleAsync(UserJoinedEventArgs args) { var data = _db.GetData(args.Guild); var targetRole = args.Guild.GetRole(data.Configuration.Autorole); if (targetRole is null) { _logger.Debug(LogSource.Volte, $"Guild {args.Guild.Name}'s Autorole is set to an ID of a role that no longer exists; or is not set at all."); return; } await args.User.AddRoleAsync(targetRole); _logger.Debug(LogSource.Volte, $"Applied role {targetRole.Name} to user {args.User} in guild {args.Guild.Name}."); }
private void Fire_UserJoined(UserJoinedEventArgs o) { op.Post(x => OnUserJoined(this, (UserJoinedEventArgs)x), o); }
//Get the name of the user who joined to channel void OnUserJoined(UserJoinedEventArgs userJoinedArgs) { //ChatText.text += "<b>" + "USER JOINED" + ":</b> " + userJoinedArgs.User + "\n"; Debug.Log("USER JOINED: " + userJoinedArgs.User); //Users.Add(userJoinedArgs.User); }
void client_UserJoined(object sender, UserJoinedEventArgs e) { lstUsers.Items.Add(e.User); }
// Get the name of the user who joined the channel void OnUserJoined(UserJoinedEventArgs userJoinedArgs) { AppendAndScroll("<b>" + "USER JOINED" + ":</b> " + userJoinedArgs.User); }
private static void Client_UserJoined(object sender, UserJoinedEventArgs e) { Console.WriteLine($"{e.UserName} has joined {e.Channel}"); }
private void Client_UserJoined(object sender, UserJoinedEventArgs e) { }
/// <summary> /// Capture and display if an user has joined the channel /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Client_UserJoined(object sender, UserJoinedEventArgs e) { this.Messages = this.Messages + "\n" + e.User + " has joined. "; this.ConnectionList.Add(e.User); }