public override async Task SelectAsync() { await MenuInstance.ListenMessageAsync(); await MenuInstance.Message.EditAsync(new EditMessageArgs { embed = Parent.Build() }); await Parent.SelectAsync(); }
public override async Task SelectAsync() { await MenuInstance.ListenMessageAsync(); await MenuInstance.Message.ModifyAsync(x => { x.Embed = Parent.Build(); }); await Parent.SelectAsync(); }
public override async Task SelectAsync() { Args a = await MenuInstance.ListenMessageAsync(); ArgObject arg = a.FirstOrDefault(); if (arg != null) { int?pageId = arg.AsInt(); if (pageId != null) { pageId = Math.Clamp(pageId.Value, 1, Children.Count + 1); await(MenuInstance.Message as IUserMessage).ModifyAsync(x => { x.Embed = Children[pageId.Value - 1].Build(); }); await Children[pageId.Value - 1].SelectAsync(); } } }
public override async Task SelectAsync() { Args a = await MenuInstance.ListenMessageAsync(); ArgObject arg = a.FirstOrDefault(); if (arg != null) { int?pageId = arg.TakeInt(); if (pageId != null) { pageId = Math.Clamp(pageId.Value, 1, Children.Count + 1); await MenuInstance.Message.EditAsync(new EditMessageArgs() { embed = Children[pageId.Value - 1].Build() }); await Children[pageId.Value - 1].SelectAsync(); } } }