Merge remote-tracking branch 'refs/remotes/Kwoth/master' into Ncalc

This commit is contained in:
appelemac 2016-05-29 19:45:54 +02:00
commit 5d3a64e270
6 changed files with 25 additions and 5 deletions

View File

@ -40,7 +40,7 @@ ________________________________________________________________________________
- Go to My Computer, right click and select Properties. On the left tab, select Advanced System Settings. Under the Advanced tab, select Environmental Variables near the bottom. One of the variables should be called "Path". Add a semi-colon (;) to the end followed by your FFMPEG's **bin** install location (**for example C:\\ffmpeg\\bin**). Save and close. - Go to My Computer, right click and select Properties. On the left tab, select Advanced System Settings. Under the Advanced tab, select Environmental Variables near the bottom. One of the variables should be called "Path". Add a semi-colon (;) to the end followed by your FFMPEG's **bin** install location (**for example C:\\ffmpeg\\bin**). Save and close.
- Go to console.developers.google.com and log in. - Go to console.developers.google.com and log in.
- Create a new project (name does not matter). Once the project is created, go into "Enable and manage APIs." - Create a new project (name does not matter). Once the project is created, go into "Enable and manage APIs."
- Under the "Other Popular APIs" section, enable "URL Shortener API". Under the "YouTube APIs" section, enable "YouTube Data API". - Under the "Other Popular APIs" section, enable "URL Shortener API". Under the "YouTube APIs" section, enable "YouTube Data API". Also enable Custom Search Api.
- On the left tab, access Credentials. There will be a line saying "If you wish to skip this step and create an API key, client ID or service account." Click on API Key, and then Server Key in the new window that appears. Enter in a name for the server key. A new window will appear with your Google API key. Copy the key. - On the left tab, access Credentials. There will be a line saying "If you wish to skip this step and create an API key, client ID or service account." Click on API Key, and then Server Key in the new window that appears. Enter in a name for the server key. A new window will appear with your Google API key. Copy the key.
- Open up credentials.json. For "GoogleAPIKey", fill in with the new key. - Open up credentials.json. For "GoogleAPIKey", fill in with the new key.
- Go to (https://soundcloud.com/you/apps/new). Enter a name for the app and create it. You will see a page with the title of your app, and a field labeled Client ID. Copy the ID. In credentials.json, fill in "SoundcloudClientID" with the copied ID. - Go to (https://soundcloud.com/you/apps/new). Enter a name for the app and create it. You will see a page with the title of your app, and a field labeled Client ID. Copy the ID. In credentials.json, fill in "SoundcloudClientID" with the copied ID.

View File

@ -48,6 +48,11 @@ Note if the command is not be initiated, hit **Enter**
<pre><code class="language-bash">echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list <pre><code class="language-bash">echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
</code></pre> </code></pre>
**2.5)**
*ONLY DEBIAN 8 and later*
<pre><code class="language-bash">echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
</code></pre>
**3)** **3)**
<pre><code class="language-bash">apt-get install mono-devel <pre><code class="language-bash">apt-get install mono-devel
</code></pre> </code></pre>

View File

@ -6,6 +6,7 @@ using NadekoBot.Modules.Permissions.Classes;
using System; using System;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks;
using ChPermOverride = Discord.ChannelPermissionOverrides; using ChPermOverride = Discord.ChannelPermissionOverrides;
namespace NadekoBot.Modules.Administration.Commands namespace NadekoBot.Modules.Administration.Commands
@ -91,12 +92,26 @@ namespace NadekoBot.Modules.Administration.Commands
.AddCheck(SimpleCheckers.ManageChannels()) .AddCheck(SimpleCheckers.ManageChannels())
.Do(async e => .Do(async e =>
{ {
if (!e.Server.CurrentUser.ServerPermissions.ManageChannels)
{
await e.Channel.SendMessage("`I have insufficient permission to do that.`");
return;
}
var allTxtChannels = e.Server.TextChannels.Where(c => c.Name.EndsWith("-voice")); var allTxtChannels = e.Server.TextChannels.Where(c => c.Name.EndsWith("-voice"));
var validTxtChannelNames = e.Server.VoiceChannels.Select(c => GetChannelName(c.Name)); var validTxtChannelNames = e.Server.VoiceChannels.Select(c => GetChannelName(c.Name));
var invalidTxtChannels = allTxtChannels.Where(c => !validTxtChannelNames.Contains(c.Name)); var invalidTxtChannels = allTxtChannels.Where(c => !validTxtChannelNames.Contains(c.Name));
invalidTxtChannels.ForEach(async c => await c.Delete()); foreach (var c in invalidTxtChannels)
{
try
{
await c.Delete();
}
catch { }
await Task.Delay(500);
}
await e.Channel.SendMessage("`Done.`"); await e.Channel.SendMessage("`Done.`");
}); });

View File

@ -292,7 +292,7 @@ namespace NadekoBot.Modules.Pokemon
var targetType = stringToPokemonType(targetTypeStr); var targetType = stringToPokemonType(targetTypeStr);
if (targetType == null) if (targetType == null)
{ {
await e.Channel.SendMessage("Invalid type specified. Type must be one of:\nNORMAL, FIRE, WATER, ELECTRIC, GRASS, ICE, FIGHTING, POISON, GROUND, FLYING, PSYCHIC, BUG, ROCK, GHOST, DRAGON, DARK, STEEL").ConfigureAwait(false); await e.Channel.SendMessage("Invalid type specified. Type must be one of:\n" + string.Join(", ", NadekoBot.Config.PokemonTypes.Select(t => t.Name.ToUpperInvariant()))).ConfigureAwait(false);
return; return;
} }
if (targetType == GetPokeType(e.User.Id)) if (targetType == GetPokeType(e.User.Id))

View File

@ -189,7 +189,7 @@
"vine whip", "vine whip",
"razor leaf" "razor leaf"
], ],
"Icon": "🌿" "Icon": "🍃"
}, },
{ {
"Name": "ICE", "Name": "ICE",

View File

@ -53,7 +53,7 @@ Next to your exe you must also have a data folder in which there is config.json
``` ```
- http://discord.kongslien.net/guide.html <- to make a bot account and get the `Token` - http://discord.kongslien.net/guide.html <- to make a bot account and get the `Token`
- BotId and OwnerIds are **NOT** names of the owner and the bot. If you do not know the id of your bot, put 2 random numbers in those fields, run the bot and do `.uid @MyBotName` - that will give you your bot\_id, do the same for yourself `.uid @MyName` and copy the numbers in their respective fields. - BotId and OwnerIds are **NOT** names of the owner and the bot. If you do not know the id of your bot, put 2 random numbers in those fields, run the bot and do `.uid @MyBotName` - that will give you your bot\_id, do the same for yourself `.uid @MyName` and copy the numbers in their respective fields.
- For google api key, you need to enable URL shortner, Youtube video search **and custom search** in the [dev console](https://console.developers.google.com/). - For google api key, you need to enable URL shortner, Youtube data API and Custom search in the [dev console](https://console.developers.google.com/).
- For the Soundcloud Api key you need a Soundcloud account. You need to create a new app on http://soundcloud.com/you/apps/new and after that go here http://soundcloud.com/you/apps click on the name of your created your app and copy the Client ID. Paste it into credentials.json. - For the Soundcloud Api key you need a Soundcloud account. You need to create a new app on http://soundcloud.com/you/apps/new and after that go here http://soundcloud.com/you/apps click on the name of your created your app and copy the Client ID. Paste it into credentials.json.
- For Mashape Api Key you need to create an account on their api marketplace here https://market.mashape.com/. After that you need to go to market.mashape.com/YOURNAMEHERE/applications/default-application and press GET THE KEYS in the right top corner copy paste it into your credentials.json and you are ready to race! - For Mashape Api Key you need to create an account on their api marketplace here https://market.mashape.com/. After that you need to go to market.mashape.com/YOURNAMEHERE/applications/default-application and press GET THE KEYS in the right top corner copy paste it into your credentials.json and you are ready to race!
- If you want to have music, you need to download FFMPEG from this link http://ffmpeg.zeranoe.com/builds/ (static build version) and add ffmpeg/bin folder to your PATH environment variable. You do that by opening explorer -> right click 'This PC' -> properties -> advanced system settings -> In the top part, there is a PATH field, add `;` to the end and then your ffmpeg install location /bin (for example ;C:\ffmpeg-5.6.7\bin) and save. Open command prompt and type ffmpeg to see if you added it correctly. If it says "command not found" then you made a mistake somewhere. There are a lot of guides on the internet on how to add stuff to your PATH, check them out if you are stuck. - If you want to have music, you need to download FFMPEG from this link http://ffmpeg.zeranoe.com/builds/ (static build version) and add ffmpeg/bin folder to your PATH environment variable. You do that by opening explorer -> right click 'This PC' -> properties -> advanced system settings -> In the top part, there is a PATH field, add `;` to the end and then your ffmpeg install location /bin (for example ;C:\ffmpeg-5.6.7\bin) and save. Open command prompt and type ffmpeg to see if you added it correctly. If it says "command not found" then you made a mistake somewhere. There are a lot of guides on the internet on how to add stuff to your PATH, check them out if you are stuck.