get link removed

This commit is contained in:
samvaio 2016-12-25 19:42:18 +05:30
parent 37c3fd240d
commit 0114d9c1e4
3 changed files with 0 additions and 71 deletions

View File

@ -773,41 +773,6 @@ namespace NadekoBot.Modules.Music
await channel.SendConfirmAsync($"Skipped to `{minutes}:{seconds}`").ConfigureAwait(false); await channel.SendConfirmAsync($"Skipped to `{minutes}:{seconds}`").ConfigureAwait(false);
} }
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task GetLink(IUserMessage umsg, int index = 0)
{
var channel = (ITextChannel)umsg.Channel;
MusicPlayer musicPlayer;
if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer))
return;
if (index < 0)
return;
if (index > 0)
{
var selSong = musicPlayer.Playlist.DefaultIfEmpty(null).ElementAtOrDefault(index - 1);
if (selSong == null)
{
await channel.SendErrorAsync("Could not select song, likely wrong index");
}
else
{
await channel.SendMessageAsync($"🎶 Selected song **{selSong.SongInfo.Title}**: <{selSong.SongInfo.Query}>").ConfigureAwait(false);
}
}
else
{
var curSong = musicPlayer.CurrentSong;
if (curSong == null)
return;
await channel.SendMessageAsync($"🎶 Current song **{curSong.SongInfo.Title}**: <{curSong.SongInfo.Query}>").ConfigureAwait(false);
}
}
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)] [RequireContext(ContextType.Guild)]
public async Task Autoplay(IUserMessage umsg) public async Task Autoplay(IUserMessage umsg)

View File

@ -2624,33 +2624,6 @@ namespace NadekoBot.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to getlink gl.
/// </summary>
public static string getlink_cmd {
get {
return ResourceManager.GetString("getlink_cmd", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Shows a link to the song in the queue by index, or the currently playing song by default..
/// </summary>
public static string getlink_desc {
get {
return ResourceManager.GetString("getlink_desc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to `{0}gl`.
/// </summary>
public static string getlink_usage {
get {
return ResourceManager.GetString("getlink_usage", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to give. /// Looks up a localized string similar to give.
/// </summary> /// </summary>

View File

@ -1692,15 +1692,6 @@
<data name="goto_usage" xml:space="preserve"> <data name="goto_usage" xml:space="preserve">
<value>`{0}goto 30`</value> <value>`{0}goto 30`</value>
</data> </data>
<data name="getlink_cmd" xml:space="preserve">
<value>getlink gl</value>
</data>
<data name="getlink_desc" xml:space="preserve">
<value>Shows a link to the song in the queue by index, or the currently playing song by default.</value>
</data>
<data name="getlink_usage" xml:space="preserve">
<value>`{0}gl`</value>
</data>
<data name="autoplay_cmd" xml:space="preserve"> <data name="autoplay_cmd" xml:space="preserve">
<value>autoplay ap</value> <value>autoplay ap</value>
</data> </data>