.setstream added

This commit is contained in:
Kwoth 2016-10-21 16:40:35 +02:00
parent 2279b4a35e
commit 9ae52a548c
3 changed files with 51 additions and 1 deletions

View File

@ -689,7 +689,21 @@ namespace NadekoBot.Modules.Administration
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]

View File

@ -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>
/// Looks up a localized string similar to settopic st.
/// </summary>

View File

@ -2475,4 +2475,13 @@
<data name="adsarm_usage" xml:space="preserve">
<value>`{0}adsarm`</value>
</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>