Voltana's at it again, new api changes.
This commit is contained in:
parent
4f3e58e1f0
commit
e0ff0b4447
@ -26,10 +26,10 @@ namespace NadekoBot
|
||||
while (helpstr.Length > 2000)
|
||||
{
|
||||
var curstr = helpstr.Substring(0, 2000);
|
||||
await client.SendPrivateMessage(e.User, curstr.Substring(0, curstr.LastIndexOf("\n")+1));
|
||||
await client.SendMessage(e.User, curstr.Substring(0, curstr.LastIndexOf("\n")+1));
|
||||
helpstr = curstr.Substring(curstr.LastIndexOf("\n")+1) + helpstr.Substring(2000);
|
||||
}
|
||||
await client.SendPrivateMessage(e.User, helpstr);
|
||||
await client.SendMessage(e.User, helpstr);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace NadekoBot.Modules
|
||||
|
||||
try
|
||||
{
|
||||
await client.EditUser(usr, null, null, new Discord.Role[] { role }, Discord.EditMode.Add);
|
||||
await client.EditUser(usr, null, null,null, new Discord.Role[] { role }, Discord.EditMode.Add);
|
||||
await e.Send( $"Successfully added role **{role.Name}** to user **{usr.Mention}**");
|
||||
}
|
||||
catch (InvalidOperationException) { //fkin voltana and his shenanigans, fix role.Mention pl0x
|
||||
@ -75,7 +75,7 @@ namespace NadekoBot.Modules
|
||||
|
||||
try
|
||||
{
|
||||
await client.EditUser(usr, null, null, new Discord.Role[]{ role }, Discord.EditMode.Remove);
|
||||
await client.EditUser(usr, null, null,null, new Discord.Role[]{ role }, Discord.EditMode.Remove);
|
||||
await e.Send( $"Successfully removed role **{role.Name}** from user **{usr.Mention}**");
|
||||
}
|
||||
catch (InvalidOperationException) {
|
||||
|
@ -343,7 +343,7 @@ namespace NadekoBot.Modules
|
||||
f.Read(b, 0, b.Length);
|
||||
f.Close();
|
||||
string str = Encoding.ASCII.GetString(b);
|
||||
await client.SendPrivateMessage(e.User, "```" + (str.Length < 1950 ? str : str.Substring(0, 1950)) + "```");
|
||||
await client.SendMessage(e.User, "```" + (str.Length < 1950 ? str : str.Substring(0, 1950)) + "```");
|
||||
});
|
||||
|
||||
CreateCommand(cgb, "cs")
|
||||
@ -392,9 +392,9 @@ namespace NadekoBot.Modules
|
||||
{
|
||||
string str = StatsCollector.GetRequests();
|
||||
if (str.Trim().Length > 110)
|
||||
await client.SendPrivateMessage(e.User, str);
|
||||
await client.SendMessage(e.User, str);
|
||||
else
|
||||
await client.SendPrivateMessage(e.User, "No requests atm.");
|
||||
await client.SendMessage(e.User, "No requests atm.");
|
||||
});
|
||||
|
||||
CreateCommand(cgb, "dr")
|
||||
@ -436,7 +436,7 @@ namespace NadekoBot.Modules
|
||||
if (sc != null)
|
||||
{
|
||||
await e.Send(e.User.Mention + " Request resolved, notice sent.");
|
||||
await client.SendPrivateMessage(client.GetUser(client.GetServer(sc.ServerId), sc.Id), "**This request of yours has been resolved:**\n" + sc.Text);
|
||||
await client.SendMessage(client.GetUser(client.GetServer(sc.ServerId), sc.Id), "**This request of yours has been resolved:**\n" + sc.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -530,11 +530,12 @@ namespace NadekoBot.Modules
|
||||
foreach (var s in client.AllServers) {
|
||||
try
|
||||
{
|
||||
i++;
|
||||
var invite = await client.CreateInvite(e.Channel, 0, 0);
|
||||
var invite = await client.CreateInvite(s, 0, 0);
|
||||
invites+=invite.Url+"\n";
|
||||
i++;
|
||||
}
|
||||
catch (Exception) {
|
||||
catch (Exception ex) {
|
||||
Console.WriteLine(ex.ToString());
|
||||
j++;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user