adds info to group invite while we test stuff, also cleans up invite code
This commit is contained in:
parent
7060678986
commit
3fc649738d
1 changed files with 11 additions and 8 deletions
|
|
@ -16,18 +16,21 @@ namespace BSB.Commands.Group
|
||||||
UUID target_role = UUID.Zero;
|
UUID target_role = UUID.Zero;
|
||||||
if (args.Length == 3)
|
if (args.Length == 3)
|
||||||
{
|
{
|
||||||
UUID.TryParse(args[2], out target_role);
|
if(UUID.TryParse(args[2], out target_role) == true)
|
||||||
}
|
{
|
||||||
List<UUID> invite_roles = new List<UUID>();
|
ConsoleLog.Info("GroupInvite: Inviting to role: "+ target_role.ToString()+".");
|
||||||
if (target_role != UUID.Zero)
|
}
|
||||||
{
|
else
|
||||||
invite_roles.Add(target_role);
|
{
|
||||||
invite_roles.Add(UUID.Zero);
|
ConsoleLog.Info("GroupInvite: Role uuid not vaild using everyone.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
invite_roles.Add(UUID.Zero);
|
ConsoleLog.Info("GroupInvite: Inviting to everyone role.");
|
||||||
}
|
}
|
||||||
|
List<UUID> invite_roles = new List<UUID>();
|
||||||
|
invite_roles.Add(target_role);
|
||||||
bot.GetClient.Groups.Invite(group, invite_roles, avatar);
|
bot.GetClient.Groups.Invite(group, invite_roles, avatar);
|
||||||
}
|
}
|
||||||
public override void Callback(string[] args, EventArgs e)
|
public override void Callback(string[] args, EventArgs e)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue