added vc role to other server

master
Lan 3 years ago
parent 81ec4922bf
commit e92be40d9c
  1. 14
      Kehyeedra3/Event handlers.cs

@ -44,6 +44,13 @@ namespace Kehyeedra3
var user = await guild.GetUserAsync(arg1.Id); var user = await guild.GetUserAsync(arg1.Id);
await user.AddRoleAsync(role); await user.AddRoleAsync(role);
} }
if (guild.Id == 912778610300039198)
{
Console.WriteLine($"{arg1.Username} joined voice on VCH");
var role = guild.GetRole(914676573091811349);
var user = await guild.GetUserAsync(arg1.Id);
await user.AddRoleAsync(role);
}
} }
if (arg2.VoiceChannel != null && arg3.VoiceChannel == null) if (arg2.VoiceChannel != null && arg3.VoiceChannel == null)
{ {
@ -55,6 +62,13 @@ namespace Kehyeedra3
var user = await guild.GetUserAsync(arg1.Id); var user = await guild.GetUserAsync(arg1.Id);
await user.RemoveRoleAsync(role); await user.RemoveRoleAsync(role);
} }
if (guild.Id == 912778610300039198)
{
Console.WriteLine($"{arg1.Username} left voice on VCH");
var role = guild.GetRole(914676573091811349);
var user = await guild.GetUserAsync(arg1.Id);
await user.RemoveRoleAsync(role);
}
} }
} }
} }

Loading…
Cancel
Save