Beam renamed to mixer. Version upped.

This commit is contained in:
Master Kwoth 2017-08-06 16:07:48 +02:00
parent 57dd324f3e
commit e2d7ed343c
6 changed files with 17 additions and 17 deletions

View File

@ -212,7 +212,7 @@ namespace NadekoBot.Modules.Administration
type = FollowedStream.FollowedStreamType.Twitch; type = FollowedStream.FollowedStreamType.Twitch;
break; break;
case StreamNotificationConfig0_9.StreamType.Beam: case StreamNotificationConfig0_9.StreamType.Beam:
type = FollowedStream.FollowedStreamType.Beam; type = FollowedStream.FollowedStreamType.Mixer;
break; break;
case StreamNotificationConfig0_9.StreamType.Hitbox: case StreamNotificationConfig0_9.StreamType.Hitbox:
type = FollowedStream.FollowedStreamType.Hitbox; type = FollowedStream.FollowedStreamType.Hitbox;

View File

@ -126,8 +126,8 @@ namespace NadekoBot.Modules.Searches.Services
}; };
_cachedStatuses.AddOrUpdate(twitchUrl, result, (key, old) => result); _cachedStatuses.AddOrUpdate(twitchUrl, result, (key, old) => result);
return result; return result;
case FollowedStream.FollowedStreamType.Beam: case FollowedStream.FollowedStreamType.Mixer:
var beamUrl = $"https://beam.pro/api/v1/channels/{stream.Username.ToLowerInvariant()}"; var beamUrl = $"https://mixer.com/api/v1/channels/{stream.Username.ToLowerInvariant()}";
if (checkCache && _cachedStatuses.TryGetValue(beamUrl, out result)) if (checkCache && _cachedStatuses.TryGetValue(beamUrl, out result))
return result; return result;
using (var http = new HttpClient()) using (var http = new HttpClient())
@ -179,11 +179,11 @@ namespace NadekoBot.Modules.Searches.Services
public string GetLink(FollowedStream fs) public string GetLink(FollowedStream fs)
{ {
if (fs.Type == FollowedStream.FollowedStreamType.Hitbox) if (fs.Type == FollowedStream.FollowedStreamType.Hitbox)
return $"http://www.hitbox.tv/{fs.Username}/"; return $"https://www.hitbox.tv/{fs.Username}/";
if (fs.Type == FollowedStream.FollowedStreamType.Twitch) if (fs.Type == FollowedStream.FollowedStreamType.Twitch)
return $"http://www.twitch.tv/{fs.Username}/"; return $"https://www.twitch.tv/{fs.Username}/";
if (fs.Type == FollowedStream.FollowedStreamType.Beam) if (fs.Type == FollowedStream.FollowedStreamType.Mixer)
return $"https://beam.pro/{fs.Username}/"; return $"https://www.mixer.com/{fs.Username}/";
return "??"; return "??";
} }
} }

View File

@ -41,8 +41,8 @@ namespace NadekoBot.Modules.Searches
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
[RequireUserPermission(GuildPermission.ManageMessages)] [RequireUserPermission(GuildPermission.ManageMessages)]
public async Task Beam([Remainder] string username) => public async Task Mixer([Remainder] string username) =>
await TrackStream((ITextChannel)Context.Channel, username, FollowedStream.FollowedStreamType.Beam) await TrackStream((ITextChannel)Context.Channel, username, FollowedStream.FollowedStreamType.Mixer)
.ConfigureAwait(false); .ConfigureAwait(false);
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]

View File

@ -1827,14 +1827,14 @@
<data name="twitch_usage" xml:space="preserve"> <data name="twitch_usage" xml:space="preserve">
<value>`{0}twitch SomeStreamer`</value> <value>`{0}twitch SomeStreamer`</value>
</data> </data>
<data name="beam_cmd" xml:space="preserve"> <data name="mixer_cmd" xml:space="preserve">
<value>beam bm</value> <value>mixer bm</value>
</data> </data>
<data name="beam_desc" xml:space="preserve"> <data name="mixer_desc" xml:space="preserve">
<value>Notifies this channel when a certain user starts streaming.</value> <value>Notifies this channel when a certain user starts streaming.</value>
</data> </data>
<data name="beam_usage" xml:space="preserve"> <data name="mixer_usage" xml:space="preserve">
<value>`{0}beam SomeStreamer`</value> <value>`{0}mixer SomeStreamer`</value>
</data> </data>
<data name="removestream_cmd" xml:space="preserve"> <data name="removestream_cmd" xml:space="preserve">
<value>removestream rms</value> <value>removestream rms</value>
@ -1843,7 +1843,7 @@
<value>Removes notifications of a certain streamer from a certain platform on this channel.</value> <value>Removes notifications of a certain streamer from a certain platform on this channel.</value>
</data> </data>
<data name="removestream_usage" xml:space="preserve"> <data name="removestream_usage" xml:space="preserve">
<value>`{0}rms Twitch SomeGuy` or `{0}rms Beam SomeOtherGuy`</value> <value>`{0}rms Twitch SomeGuy` or `{0}rms mixer SomeOtherGuy`</value>
</data> </data>
<data name="liststreams_cmd" xml:space="preserve"> <data name="liststreams_cmd" xml:space="preserve">
<value>liststreams ls</value> <value>liststreams ls</value>

View File

@ -9,7 +9,7 @@
public enum FollowedStreamType public enum FollowedStreamType
{ {
Twitch, Hitbox, Beam Twitch, Hitbox, Mixer
} }
public override int GetHashCode() => public override int GetHashCode() =>

View File

@ -20,7 +20,7 @@ namespace NadekoBot.Services.Impl
private readonly IBotCredentials _creds; private readonly IBotCredentials _creds;
private readonly DateTime _started; private readonly DateTime _started;
public const string BotVersion = "1.6.3"; public const string BotVersion = "1.6.4";
public string Author => "Kwoth#2560"; public string Author => "Kwoth#2560";
public string Library => "Discord.Net"; public string Library => "Discord.Net";