.setstream added
This commit is contained in:
		@@ -689,7 +689,21 @@ namespace NadekoBot.Modules.Administration
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            await NadekoBot.Client.GetCurrentUser().ModifyStatusAsync(u => u.Game = new Game(game)).ConfigureAwait(false);
 | 
					            await NadekoBot.Client.GetCurrentUser().ModifyStatusAsync(u => u.Game = new Game(game)).ConfigureAwait(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            await channel.SendMessageAsync("New game set.").ConfigureAwait(false);
 | 
					            await channel.SendMessageAsync("`New game set.`").ConfigureAwait(false);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        [NadekoCommand, Usage, Description, Aliases]
 | 
				
			||||||
 | 
					        [RequireContext(ContextType.Guild)]
 | 
				
			||||||
 | 
					        [OwnerOnly]
 | 
				
			||||||
 | 
					        public async Task SetStream(IUserMessage umsg, string url, [Remainder] string name = null)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            var channel = (ITextChannel)umsg.Channel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            name = name ?? "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            await NadekoBot.Client.GetCurrentUser().ModifyStatusAsync(u => u.Game = new Game(name, url, StreamType.Twitch)).ConfigureAwait(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            await channel.SendMessageAsync("`New stream set.`").ConfigureAwait(false);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        [NadekoCommand, Usage, Description, Aliases]
 | 
					        [NadekoCommand, Usage, Description, Aliases]
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								src/NadekoBot/Resources/CommandStrings.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										27
									
								
								src/NadekoBot/Resources/CommandStrings.Designer.cs
									
									
									
										generated
									
									
									
								
							@@ -5729,6 +5729,33 @@ namespace NadekoBot.Resources {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///    Looks up a localized string similar to setstream.
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public static string setstream_cmd {
 | 
				
			||||||
 | 
					            get {
 | 
				
			||||||
 | 
					                return ResourceManager.GetString("setstream_cmd", resourceCulture);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///    Looks up a localized string similar to Sets the bots stream. First argument is the twitch link, second argument is stream name..
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public static string setstream_desc {
 | 
				
			||||||
 | 
					            get {
 | 
				
			||||||
 | 
					                return ResourceManager.GetString("setstream_desc", resourceCulture);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        ///    Looks up a localized string similar to `{0}setstream https://www.twitch.tv/masterkwoth Developing Nakedo`.
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public static string setstream_usage {
 | 
				
			||||||
 | 
					            get {
 | 
				
			||||||
 | 
					                return ResourceManager.GetString("setstream_usage", resourceCulture);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        ///    Looks up a localized string similar to settopic st.
 | 
					        ///    Looks up a localized string similar to settopic st.
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2475,4 +2475,13 @@
 | 
				
			|||||||
  <data name="adsarm_usage" xml:space="preserve">
 | 
					  <data name="adsarm_usage" xml:space="preserve">
 | 
				
			||||||
    <value>`{0}adsarm`</value>
 | 
					    <value>`{0}adsarm`</value>
 | 
				
			||||||
  </data>
 | 
					  </data>
 | 
				
			||||||
 | 
					  <data name="setstream_cmd" xml:space="preserve">
 | 
				
			||||||
 | 
					    <value>setstream</value>
 | 
				
			||||||
 | 
					  </data>
 | 
				
			||||||
 | 
					  <data name="setstream_desc" xml:space="preserve">
 | 
				
			||||||
 | 
					    <value>Sets the bots stream. First argument is the twitch link, second argument is stream name.</value>
 | 
				
			||||||
 | 
					  </data>
 | 
				
			||||||
 | 
					  <data name="setstream_usage" xml:space="preserve">
 | 
				
			||||||
 | 
					    <value>`{0}setstream https://www.twitch.tv/masterkwoth Developing Nakedo`</value>
 | 
				
			||||||
 | 
					  </data>
 | 
				
			||||||
</root>
 | 
					</root>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user