diff --git a/NadekoBot/Modules/Administration/Commands/CustomReactionsCommands.cs b/NadekoBot/Modules/Administration/Commands/CustomReactionsCommands.cs index 575e2493..a0eae66d 100644 --- a/NadekoBot/Modules/Administration/Commands/CustomReactionsCommands.cs +++ b/NadekoBot/Modules/Administration/Commands/CustomReactionsCommands.cs @@ -22,7 +22,7 @@ namespace NadekoBot.Modules.Administration.Commands cgb.CreateCommand(Prefix + "addcustreact") .Alias(Prefix + "acr") - .Description($"Add a custom reaction. Guide here: **Bot Owner Only!** | `{Prefix}acr \"hello\" Hi there %user%`") + .Description($"Add a custom reaction. Guide here: **Bot Owner Only!** | `{Prefix}acr \"hello\" Hi there %user%`") .AddCheck(SimpleCheckers.OwnerOnly()) .Parameter("name", ParameterType.Required) .Parameter("message", ParameterType.Unparsed) diff --git a/NadekoBot/Modules/Games/Commands/TriviaCommand.cs b/NadekoBot/Modules/Games/Commands/TriviaCommand.cs index 75481309..3a24eebb 100644 --- a/NadekoBot/Modules/Games/Commands/TriviaCommand.cs +++ b/NadekoBot/Modules/Games/Commands/TriviaCommand.cs @@ -33,8 +33,11 @@ namespace NadekoBot.Modules.Games.Commands int num; return new Tuple(int.TryParse(s, out num), num); }).Where(t => t.Item1).Select(t => t.Item2).FirstOrDefault(); - if (number < 0) + if (number < 3) + { + await e.Channel.SendMessage("Number too small."); return; + } var triviaGame = new TriviaGame(e, showHints, number == 0 ? 10 : number); if (RunningTrivias.TryAdd(e.Server.Id, triviaGame)) await e.Channel.SendMessage($"**Trivia game started! {triviaGame.WinRequirement} points needed to win.**").ConfigureAwait(false); diff --git a/NadekoBot/Modules/Permissions/Classes/PermissionHelper.cs b/NadekoBot/Modules/Permissions/Classes/PermissionHelper.cs index c972953e..d4a07e21 100644 --- a/NadekoBot/Modules/Permissions/Classes/PermissionHelper.cs +++ b/NadekoBot/Modules/Permissions/Classes/PermissionHelper.cs @@ -59,7 +59,7 @@ namespace NadekoBot.Modules.Permissions.Classes foreach (var com in NadekoBot.Client.GetService().AllCommands) { - if (com.Text.ToUpperInvariant().Equals(normalizedCmdTxt) || com.Aliases.Select(c=>c.ToUpperInvariant()).Contains(normalizedCmdTxt)) + if (com.Text.ToUpperInvariant().Equals(normalizedCmdTxt) || com.Aliases.Select(c => c.ToUpperInvariant()).Contains(normalizedCmdTxt)) return com.Text; } throw new NullReferenceException("That command does not exist."); diff --git a/NadekoBot/Modules/Searches/Commands/StreamNotifications.cs b/NadekoBot/Modules/Searches/Commands/StreamNotifications.cs index 1513d0e7..f1bfb084 100644 --- a/NadekoBot/Modules/Searches/Commands/StreamNotifications.cs +++ b/NadekoBot/Modules/Searches/Commands/StreamNotifications.cs @@ -109,13 +109,13 @@ namespace NadekoBot.Modules.Searches.Commands cachedStatuses.TryAdd(hitboxUrl, result); return result; case StreamNotificationConfig.StreamType.Twitch: - var twitchUrl = $"https://api.twitch.tv/kraken/streams/{Uri.EscapeUriString(stream.Username)}"; + var twitchUrl = $"https://api.twitch.tv/kraken/streams/{Uri.EscapeUriString(stream.Username)}?client_id=67w6z9i09xv2uoojdm9l0wsyph4hxo6"; if (checkCache && cachedStatuses.TryGetValue(twitchUrl, out result)) return result; response = await SearchHelper.GetResponseStringAsync(twitchUrl).ConfigureAwait(false); data = JObject.Parse(response); isLive = !string.IsNullOrWhiteSpace(data["stream"].ToString()); - result = new Tuple(isLive, isLive ? data["stream"]["viewers"].ToString() : "0"); + result = new Tuple(isLive, isLive ? data["stream"]["viewers"].ToString() : stream.Username); cachedStatuses.TryAdd(twitchUrl, result); return result; case StreamNotificationConfig.StreamType.Beam: @@ -131,7 +131,7 @@ namespace NadekoBot.Modules.Searches.Commands default: break; } - return new Tuple(false, "0"); + return new Tuple(false, "NOT_FOUND"); } internal override void Init(CommandGroupBuilder cgb) @@ -180,7 +180,11 @@ namespace NadekoBot.Modules.Searches.Commands })); if (streamStatus.Item1) { - await e.Channel.SendMessage($"`Streamer {streamStatus.Item2} is online.`"); + await e.Channel.SendMessage($"`Streamer {stream} is online with {streamStatus.Item2} viewers.`"); + } + else + { + await e.Channel.SendMessage($"`Streamer {stream} is offline.`"); } } catch @@ -209,7 +213,11 @@ namespace NadekoBot.Modules.Searches.Commands })); if (streamStatus.Item1) { - await e.Channel.SendMessage($"`Streamer {streamStatus.Item2} is online.`"); + await e.Channel.SendMessage($"`Streamer {stream} is online with {streamStatus.Item2} viewers.`"); + } + else + { + await e.Channel.SendMessage($"`Streamer {stream} is offline.`"); } } catch @@ -238,7 +246,11 @@ namespace NadekoBot.Modules.Searches.Commands })); if (streamStatus.Item1) { - await e.Channel.SendMessage($"`Streamer {streamStatus.Item2} is online.`"); + await e.Channel.SendMessage($"`Streamer {stream} is online with {streamStatus.Item2} viewers.`"); + } + else + { + await e.Channel.SendMessage($"`Streamer {stream} is offline.`"); } } catch diff --git a/NadekoBot/NadekoBot.cs b/NadekoBot/NadekoBot.cs index a66de25d..41bbada1 100644 --- a/NadekoBot/NadekoBot.cs +++ b/NadekoBot/NadekoBot.cs @@ -204,7 +204,7 @@ namespace NadekoBot return; } #if NADEKO_RELEASE - await Task.Delay(220000).ConfigureAwait(false); + await Task.Delay(300000).ConfigureAwait(false); #else await Task.Delay(1000).ConfigureAwait(false); #endif diff --git a/NadekoBot/NadekoBot.csproj b/NadekoBot/NadekoBot.csproj index 223f778f..ae5e378e 100644 --- a/NadekoBot/NadekoBot.csproj +++ b/NadekoBot/NadekoBot.csproj @@ -204,6 +204,11 @@ + + True + True + Resources.resx + @@ -294,11 +299,6 @@ - - True - True - Resources.resx - @@ -324,13 +324,10 @@ PublicResXFileCodeGenerator - Resources.Designer.cs Designer + Resources.Designer.cs - - - diff --git a/NadekoBot/Properties/Resources.Designer.cs b/NadekoBot/Properties/Resources.Designer.cs index 5ebaee77..7a7bb7a4 100644 --- a/NadekoBot/Properties/Resources.Designer.cs +++ b/NadekoBot/Properties/Resources.Designer.cs @@ -580,16 +580,6 @@ namespace NadekoBot.Properties { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap hidden { - get { - object obj = ResourceManager.GetObject("hidden", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/NadekoBot/Properties/Resources.resx b/NadekoBot/Properties/Resources.resx index 98d2c435..b1b62029 100644 --- a/NadekoBot/Properties/Resources.resx +++ b/NadekoBot/Properties/Resources.resx @@ -136,9 +136,6 @@ ..\resources\images\coins\heads.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\resources\images\hidden.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\resources\images\cards\jack_of_clubs.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/NadekoBot/_Models/JSONModels/Configuration.cs b/NadekoBot/_Models/JSONModels/Configuration.cs index e01da5cf..499609ac 100644 --- a/NadekoBot/_Models/JSONModels/Configuration.cs +++ b/NadekoBot/_Models/JSONModels/Configuration.cs @@ -99,6 +99,12 @@ namespace NadekoBot.Classes.JSONModels } }, { "%mention% omega yato", new List() { "https://cdn.discordapp.com/attachments/168617088892534784/221047921410310144/Yato_Animated.gif" + } }, + { "%mention% smack", new List() { + "%target% https://66.media.tumblr.com/dd5d751f86002fd4a544dcef7a9763d6/tumblr_mjpheaAVj51s725bno1_500.gif", + "%target% https://media.giphy.com/media/jLeyZWgtwgr2U/giphy.gif", + "%target% http://orig11.deviantart.net/2d34/f/2013/339/1/2/golden_time_flower_slap_gif_by_paranoxias-d6wv007.gif", + "%target% http://media.giphy.com/media/LB1kIoSRFTC2Q/giphy.gif", } } }; @@ -192,7 +198,7 @@ For a specific command help, use `{0}h ""Command name""` (for example `-h ""!m q **LIST OF COMMANDS CAN BE FOUND ON THIS LINK** - + Nadeko Support Server: "; diff --git a/NadekoBot/bin/Debug/data/config_example.json b/NadekoBot/bin/Debug/data/config_example.json index 446ce36e..25fd8c03 100644 --- a/NadekoBot/bin/Debug/data/config_example.json +++ b/NadekoBot/bin/Debug/data/config_example.json @@ -91,6 +91,21 @@ ], "%mention% archer": [ "http://i.imgur.com/Bha9NhL.jpg" + ], + "%mention% formuoli": [ + "http://i.imgur.com/sCHYQhl.jpg" + ], + "%mention% mei": [ + "http://i.imgur.com/Xkrf5y7.png" + ], + "%mention% omega yato": [ + "https://cdn.discordapp.com/attachments/168617088892534784/221047921410310144/Yato_Animated.gif" + ], + "%mention% smack": [ + "%target% https://66.media.tumblr.com/dd5d751f86002fd4a544dcef7a9763d6/tumblr_mjpheaAVj51s725bno1_500.gif", + "%target% https://media.giphy.com/media/jLeyZWgtwgr2U/giphy.gif", + "%target% http://orig11.deviantart.net/2d34/f/2013/339/1/2/golden_time_flower_slap_gif_by_paranoxias-d6wv007.gif", + "%target% http://media.giphy.com/media/LB1kIoSRFTC2Q/giphy.gif" ] }, "RotatingStatuses": [], diff --git a/NadekoBot/resources/images/hidden.png b/NadekoBot/resources/images/hidden.png deleted file mode 100644 index 11bcc55b..00000000 Binary files a/NadekoBot/resources/images/hidden.png and /dev/null differ diff --git a/NadekoBot/resources/images/rip/rip.png b/NadekoBot/resources/images/rip/rip.png new file mode 100644 index 00000000..6225b171 Binary files /dev/null and b/NadekoBot/resources/images/rip/rip.png differ diff --git a/NadekoBot/resources/images/rip/rose_overlay.png b/NadekoBot/resources/images/rip/rose_overlay.png new file mode 100644 index 00000000..767dcd1a Binary files /dev/null and b/NadekoBot/resources/images/rip/rose_overlay.png differ diff --git a/docs/Frequently Asked Questions.md b/docs/Frequently Asked Questions.md index 66cf1438..c472a08d 100644 --- a/docs/Frequently Asked Questions.md +++ b/docs/Frequently Asked Questions.md @@ -1,69 +1,69 @@ #Frequently Asked Questions -Question 1: How do I get Nadeko to join my server? +###Question 1: How do I get Nadeko to join my server? ---- **Answer:** Simply send Nadeko a Direct Message with -h and follow the link. **Only Server Owners can add the bot to the server** -Question 2: I want to change permissions, but it isn't working! +###Question 2: I want to change permissions, but it isn't working! ---- **Answer:** You must have the ;permsrole (by default this is the "Nadeko" role, for more details on permissions check [here](http://nadekobot.readthedocs.io/en/latest/Permissions%20System/ "Permissions")) **Please note:** *Only the Server Owner can change permissions without the "Nadeko" role*. -Question 3: Music isn't working on Mac!! +###Question 3: Music isn't working on Mac!! ---- **Answer:** You will have to build `mono` from source. Simply follow the [mono-guide](http://www.mono-project.com/docs/compiling-mono/mac/ "Building mono"). -Question 4: I want to disable NSFW on my server. +###Question 4: I want to disable NSFW on my server. ---- **Answer:** To disable the NSFW Module for your server type, `;sm NSFW disable`. If this does not work refer to Question 2. -Question 5: How do I get NadekoFlowers/Currency? +###Question 5: How do I get NadekoFlowers/Currency? ---- **Answer:** You get NadekoFlowers by answering Trivia questions or picking them up after they have been generated with `>gc`, which you can then either plant (give away to a channel so that someone can pick it), gamble it with `$betflip`, `$betroll` and `$jr`, or spend on healing and setting your type in the Pokemon game. -Question 6: I have an issue/bug/suggestion, where do I put it so it gets noticed? +###Question 6: I have an issue/bug/suggestion, where do I put it so it gets noticed? ----------- **Answer:** First, check [issues](https://github.com/Kwoth/NadekoBot/issues "GitHub NadekoBot Issues"), then check the `#suggestions` in the Nadeko [help server](https://discord.gg/0ehQwTK2RBjAxzEY). If your problem or suggestion is not there, feel free to request it either in Issues or in `#suggestions`. -Question 7: How do I use this command? +###Question 7: How do I use this command? -------- **Answer:** You can see the description and usage of certain commands by using `-h command` **i.e** `-h ;sm`. The whole list of commands can be found [here](http://nadekobot.readthedocs.io/en/latest/Commands%20List/ "Command List") -Question 8: Music isn't working? +###Question 8: Music isn't working? ---- **Answer:** Music is disabled on public Nadeko, it will be re-enabled later in the future. **If you would like music you must host Nadeko yourself**. Be sure you have FFMPEG installed correctly, read the [guide](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/) for more info. -Question 9: My music is still not working/very laggy? +###Question 9: My music is still not working/very laggy? ---- **Answer:** Try changing your discord [location][1], if this doesn't work be sure you have enabled the correct permissions for Nadeko. [1]: https://support.discordapp.com/hc/en-us/articles/216661717-How-do-I-change-my-Voice-Server-Region- -Question 10: I want to change data in the database (like NadekoFlowers or the pokemontypes of users, but how? +###Question 10: I want to change data in the database (like NadekoFlowers or the pokemontypes of users, but how? ---- **Answer:** Open data/nadekobot.sqlite using sqlitebrowser (or some alternative), Browse Data, select relevant table, change data, Write changes -Question 11: The .greet and .bye commands doesn't work, but everything else is (From @Kong) +###Question 11: The .greet and .bye commands doesn't work, but everything else is (From @Kong) ----- **Answer:** Set a greeting message by using `.greetmsg YourMessageHere` and a bye-message by using `.byemsg YourMessageHere` -Question 12: How do I import certs on linux? +###Question 12: How do I import certs on linux? ------- **Answer:** `certmgr -ssl https://discordapp.com` `certmgr -ssl https://gateway.discord.gg` -Question 13: I want "BOT" tag with my bot a, is there a simple way? +###Question 13: I want "BOT" tag with my bot a, is there a simple way? ---- **Answer:** Yes, you can create an application using your account and use the APP BOT USER TOKEN from here: [DiscordApp][1] **NOTE: This will create a new bot account** [1]:https://discordapp.com/developers/applications/me -Question 14: I made an application, but I can't add that new bot to my server, how do I invite it to my server? +###Question 14: I made an application, but I can't add that new bot to my server, how do I invite it to my server? ---- **Answer:** You need to use oauth link to add it to you server, just copy your CLIENT ID (that's in the same Developer page where you brought your token) and replace `12345678` in the link below: https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303 Follow this Detailed [Guide](http://discord.kongslien.net/guide.html) if you do not understand. -Question 15:I'm building NadekoBot from source, but I get hundreds of (namespace) errors without changing anything!? +###Question 15:I'm building NadekoBot from source, but I get hundreds of (namespace) errors without changing anything!? ----- **Answer:** Using Visual Studio, you can solve these errors by going to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution`. Go to the Installed tab, select the Packages that were missing (usually `Newtonsoft.json` and `RestSharp`) and install them for all projects -Question 16: My bot has all permissions but it's still saying, "Failed to add roles. Bot has insufficient permissions.". How do I fix this? +###Question 16: My bot has all permissions but it's still saying, "Failed to add roles. Bot has insufficient permissions.". How do I fix this? ---------- **Answer:** Discord has added a few new features and roles now follow hierarchy. This means you need to place your bot's role above every-other role your server has.