carbonitex server invite handle
This commit is contained in:
parent
a39edb1001
commit
77fa8c1446
@ -9,6 +9,10 @@ using NadekoBot.Extensions;
|
||||
|
||||
namespace NadekoBot.Classes {
|
||||
|
||||
public static class SentencesProvider {
|
||||
|
||||
}
|
||||
|
||||
public class TypingGame {
|
||||
private Channel channel;
|
||||
|
||||
@ -23,7 +27,6 @@ namespace NadekoBot.Classes {
|
||||
}
|
||||
|
||||
internal void Start() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,13 +63,15 @@ namespace NadekoBot.Classes {
|
||||
};
|
||||
|
||||
public override void Init(CommandGroupBuilder cgb) {
|
||||
cgb.CreateCommand("typing contest")
|
||||
/*
|
||||
cgb.CreateCommand("typing start")
|
||||
.Description("Starts a typing contest.")
|
||||
.Do(DoFunc());
|
||||
|
||||
cgb.CreateCommand("typing stop")
|
||||
.Description("Stops a typing contest on the current channel.")
|
||||
.Do(QuitFunc());
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ namespace NadekoBot
|
||||
{
|
||||
public override Func<CommandEventArgs, Task> DoFunc() => async e =>
|
||||
{
|
||||
string helpstr = "Official repo: **github.com/Kwoth/NadekoBot/**\nBot Creator's server: https://discord.gg/0ehQwTK2RBhxEi0X";
|
||||
string helpstr = "Official repo: **github.com/Kwoth/NadekoBot/**";
|
||||
|
||||
string lastCategory = "";
|
||||
foreach (var com in client.Commands().AllCommands)
|
||||
@ -22,6 +22,7 @@ namespace NadekoBot
|
||||
}
|
||||
helpstr += PrintCommandHelp(com);
|
||||
}
|
||||
helpstr += "\nBot Creator's server: https://discord.gg/0ehQwTK2RBhxEi0X";
|
||||
helpstr = helpstr.Replace(NadekoBot.botMention, "@BotName");
|
||||
while (helpstr.Length > 2000)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace NadekoBot.Modules
|
||||
{
|
||||
public Games() : base() {
|
||||
commands.Add(new Trivia());
|
||||
commands.Add(new SpeedTyping());
|
||||
//commands.Add(new SpeedTyping());
|
||||
}
|
||||
|
||||
public override void Install(ModuleManager manager)
|
||||
|
@ -24,7 +24,7 @@ namespace NadekoBot
|
||||
public static string password;
|
||||
public static string TrelloAppKey;
|
||||
public static bool ForwardMessages = false;
|
||||
public static string BotVersion = "0.7-beta1";
|
||||
public static string BotVersion = "0.7-beta2";
|
||||
|
||||
static void Main()
|
||||
{
|
||||
@ -146,12 +146,19 @@ namespace NadekoBot
|
||||
private static async void Client_MessageReceived(object sender, MessageEventArgs e) {
|
||||
if (e.Server != null || e.User.Id == client.CurrentUser.Id) return;
|
||||
try {
|
||||
(await client.GetInvite(e.Message.Text))?.Accept();
|
||||
} catch (Exception) { }
|
||||
await (await client.GetInvite(e.Message.Text)).Accept();
|
||||
await e.Send("I got in!");
|
||||
return;
|
||||
} catch (Exception) {
|
||||
if (e.User.Id == 109338686889476096) { //carbonitex invite
|
||||
await e.Send("Failed to join the server.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ForwardMessages && OwnerUser != null)
|
||||
await OwnerUser.SendMessage(e.User +": ```\n"+e.Message.Text+"\n```");
|
||||
|
||||
|
||||
if (repliedRecently = !repliedRecently) {
|
||||
await e.Send("You can type `-h` or `-help` or `@MyName help` in any of the channels I am in and I will send you a message with my commands.\n Or you can find out what i do here: https://github.com/Kwoth/NadekoBot\nYou can also just send me an invite link to a server and I will join it.\nIf you don't want me on your server, you can simply ban me ;(\nBot Creator's server: https://discord.gg/0ehQwTK2RBhxEi0X");
|
||||
Timer t = new Timer();
|
||||
|
@ -141,6 +141,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Classes\SParser.cs" />
|
||||
<Compile Include="Classes\SpeedTyping.cs" />
|
||||
<Compile Include="Classes\_JSONModels.cs" />
|
||||
<Compile Include="Classes\Cards.cs" />
|
||||
<Compile Include="Classes\Extensions.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user