Merge branch 'master' of https://github.com/Kwoth/NadekoBot
This commit is contained in:
commit
42261a01b5
@ -9,6 +9,8 @@ ________________________________________________________________________________
|
||||
- Go to (https://discordapp.com/developers/applications/me). Log in if you have to with your Discord account. Press "New Application" and fill out an App Name and, optionally, an app description and icon. Afterwards, create the application. Once the application is created, click on "Create a Bot User" and confirm it. You will then see the bot's username, ID and token. Reveal and copy the token and the bot ID.
|
||||
- Open up credentials.json. Paste the token into the Token field, between the quotes. Paste the ID into the BotID field. Leave email and password fields empty. Save and close credentials.json.
|
||||
- Go into data folder and make sure you have config.json file. If there is no config.json, rename the config_example.json to config.json.
|
||||
- Copy your CLIENT ID (that's in the same Developer page where you brought your token) and replace `12345678` in the this link:
|
||||
https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303 with it. Go to that link and you will be able to add your bot to your server.
|
||||
- Start NadekoBot.exe. In a text channel, **not a direct message**, type in [.uid @______] without the brackets, filling in the underlined portion with your name and send the message. Your bot will reply with a number; this is your ID. Copy this ID and close NadekoBot.exe.
|
||||
- Reopen credentials.json. Paste your ID into the square brackets ("OwnerIds": [1231312313]). You can add multiple owners by separating IDs with a comma. Close and save credentials.json.
|
||||
|
||||
|
@ -810,6 +810,20 @@ namespace NadekoBot.Modules.Administration
|
||||
Console.WriteLine(ex);
|
||||
}
|
||||
});
|
||||
|
||||
cgb.CreateCommand(Prefix + "announce")
|
||||
.Description($"Sends a message to all servers' general channel bot is connected to.**Owner Only!**\n**Usage**: {Prefix}announce Useless spam")
|
||||
.Parameter("msg", ParameterType.Unparsed)
|
||||
.AddCheck(SimpleCheckers.OwnerOnly())
|
||||
.Do(async e =>
|
||||
{
|
||||
foreach (var ch in NadekoBot.Client.Servers.Select(s => s.DefaultChannel))
|
||||
{
|
||||
await ch.SendMessage(e.GetArg("msg"));
|
||||
}
|
||||
|
||||
await e.Channel.SendMessage(":ok:");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace NadekoBot.Modules.Administration.Commands
|
||||
{
|
||||
await e.Channel.SendMessage("Repeating disabled").ConfigureAwait(false);
|
||||
Repeater rep;
|
||||
if (repeaters.TryGetValue(e.Server, out rep))
|
||||
if (repeaters.TryRemove(e.Server, out rep))
|
||||
rep.MessageTimer.Stop();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user