public async Task <bool> RemoveQueue(IUser user, string queueName, string guildId) { var queue = await _client.GetItem(guildId, queueName.ToLowerInvariant()); var result = false; if (queue?.OwnerId == user.Id.ToString()) { result = await _client.Delete(queue); } return(result); }
public async Task <Blog> GetBlogInfo() { var blog = await azureTableStorage.GetItem("blogs", "primary"); if (blog != null) { return(blog); } blog = InitBlogInfo(); await SaveBlogInfo(blog); return(blog); }
public async Task <Note> GetRecordAsync(string id) { var o = await _repository.GetItem(PartitionKey, id); if (o == null) { return(null); } return(DeserializingNote(o)); }
public async Task <DuelChallenge> Find(IGuildUser challenger, IGuildUser challengee) { return(await _client.GetItem(challenger.GuildId.ToString(), $"{challenger.Id}||{challengee.Id}")); }
public async Task <Post> GetById(string id, string partitionKey = "") { return(await azureTableStorage.GetItem(partitionKey, id)); }
public async Task <DuelPlayer> Find(IGuildUser user) { return(await _client.GetItem(user.GuildId.ToString(), user.Id.ToString())); }
public async Task <SubscriberActivities> Find(IGuildUser user) { var result = await _client.GetItem(user.GuildId.ToString(), user.Id.ToString()); return(result ?? new SubscriberActivities(user)); }
public async Task <Server> Find(ulong guildId, string host) { return(await _client.GetItem(guildId.ToString(), host.ToLowerInvariant())); }
public async Task <FlaggedSubscriber> IsFlagged(IGuildUser user) { var subscriber = await _client.GetItem(user.GuildId.ToString(), user.Id.ToString()); return(subscriber); }
public async Task <ProductInfo> GetDetailsAsync(string userId, long id) { return(await _repository.GetItem(userId, id.ToString())); }
public async Task <ProductInfoHistory> GetDetailsAsync(long productId, long id) { return(await _repository.GetItem(productId, id)); }
public async Task <PickupQueue> FindQueue(string queueName, string guildId) { return(await _client.GetItem(guildId, queueName.ToLowerInvariant())); }