예제 #1
0
 public async Task NowPlaying(ICommandContext Context)
 {
     if (IsPlaying)
     {
         await Context.Channel.SendMessageAsync("", false, NowPlayingInfo.Build());
     }
     else
     {
         EmbedBuilder notplaying = new EmbedBuilder();
         notplaying.WithAuthor("Nothing is playing", Context.Client.CurrentUser.GetAvatarUrl(ImageFormat.Auto));
         notplaying.WithColor(Color.Red);
         notplaying.WithDescription("There is nothing currently playing on this guild");
         notplaying.AddField("ArcadeBOT Music", "*Only You can prevent the silence*");
         await Context.Channel.SendMessageAsync("", false, notplaying.Build());
     }
 }
예제 #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="oldInfo">The old <see cref="NowPlayingInfo"/></param>
 /// <param name="newInfo">The new <see cref="NowPlayingInfo"/></param>
 public NowPlayingChangedEventArgs(NowPlayingInfo oldInfo, NowPlayingInfo newInfo)
 {
     OldInfo = oldInfo;
     NewInfo = newInfo;
 }
예제 #3
0
 /// <summary>
 /// Compare the value equality of this <see cref="NowPlayingInfo"/> and another.
 /// </summary>
 /// <param name="other">The other <see cref="NowPlayingInfo"/> to compare.</param>
 /// <returns>True if both this and the other <see cref="NowPlayingInfo"/> have the same values.</returns>
 public bool IsEquivalentTo(NowPlayingInfo other)
 {
     return(Artist == other?.Artist &&
            Song == other?.Song &&
            ImageUrl == other?.ImageUrl);
 }