From 9a2421e8673e0c8b67ebda2d38c13202fd803d0f Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sat, 28 May 2016 14:25:09 +0200 Subject: [PATCH 1/5] fixed cleanv+t crash --- .../Commands/VoicePlusTextCommand.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommand.cs b/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommand.cs index f62b9ba6..44419682 100644 --- a/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommand.cs +++ b/NadekoBot/Modules/Administration/Commands/VoicePlusTextCommand.cs @@ -6,6 +6,7 @@ using NadekoBot.Modules.Permissions.Classes; using System; using System.Linq; using System.Text.RegularExpressions; +using System.Threading.Tasks; using ChPermOverride = Discord.ChannelPermissionOverrides; namespace NadekoBot.Modules.Administration.Commands @@ -91,12 +92,26 @@ namespace NadekoBot.Modules.Administration.Commands .AddCheck(SimpleCheckers.ManageChannels()) .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 validTxtChannelNames = e.Server.VoiceChannels.Select(c => GetChannelName(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.`"); }); From 88c589c653e46cc894764b0a9f97e76bc940f23c Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sat, 28 May 2016 16:34:31 +0200 Subject: [PATCH 2/5] changed grass poke icon, fixed typelist --- NadekoBot/Modules/Pokemon/PokemonModule.cs | 2 +- NadekoBot/bin/Debug/data/PokemonTypes.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Pokemon/PokemonModule.cs b/NadekoBot/Modules/Pokemon/PokemonModule.cs index aa271d3b..f24ea89f 100644 --- a/NadekoBot/Modules/Pokemon/PokemonModule.cs +++ b/NadekoBot/Modules/Pokemon/PokemonModule.cs @@ -292,7 +292,7 @@ namespace NadekoBot.Modules.Pokemon var targetType = stringToPokemonType(targetTypeStr); 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; } if (targetType == GetPokeType(e.User.Id)) diff --git a/NadekoBot/bin/Debug/data/PokemonTypes.json b/NadekoBot/bin/Debug/data/PokemonTypes.json index 0257a702..6d7ac74a 100644 --- a/NadekoBot/bin/Debug/data/PokemonTypes.json +++ b/NadekoBot/bin/Debug/data/PokemonTypes.json @@ -189,7 +189,7 @@ "vine whip", "razor leaf" ], - "Icon": "🌿" + "Icon": "🍃" }, { "Name": "ICE", From 30faca5d1faac0caebee225dba01f898425461e3 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 28 May 2016 22:05:17 +0200 Subject: [PATCH 3/5] Add Info for Debian 8 user --- LinuxSetup.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LinuxSetup.md b/LinuxSetup.md index 2ecc9a8f..14152c90 100644 --- a/LinuxSetup.md +++ b/LinuxSetup.md @@ -48,6 +48,11 @@ Note if the command is not be initiated, hit **Enter**
echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
 
+**2.5)** +*ONLY DEBIAN 8 and later* +
echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
+
+ **3)**
apt-get install mono-devel
 
From 95f1e39754ab4861b7a2a9bf7a8dd2ade4ab02ab Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 29 May 2016 17:09:26 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69af3760..0ad71865 100644 --- a/README.md +++ b/README.md @@ -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` - 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 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. From afbc970e5231d0675c8b0a2d743f216c2931f9c1 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 29 May 2016 17:10:21 +0200 Subject: [PATCH 5/5] Update ComprehensiveGuide.md --- ComprehensiveGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComprehensiveGuide.md b/ComprehensiveGuide.md index 2ef867a3..219b73ae 100644 --- a/ComprehensiveGuide.md +++ b/ComprehensiveGuide.md @@ -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 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." -- 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. - 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.