guilded.ts
Version:
A powerful NPM module that allows you to easily interact with the Guilded API.
68 lines • 2.52 kB
TypeScript
import { BaseManager, FetchManyOptions, FetchOptions } from './BaseManager';
import { ListChannel } from '../structures/channel/ListChannel';
import { ListItem } from '../structures/listItem/ListItem';
import { Collection } from '@discordjs/collection';
/**
* The manager of items that belong to a list channel.
* @example new ListItemManager(channel);
*/
export declare class ListItemManager extends BaseManager<string, ListItem> {
readonly channel: ListChannel;
/** @param channel The list channel the items belong to. */
constructor(channel: ListChannel);
/**
* Fetch a item from the list channel, or cache.
* @param listItem The item to fetch.
* @param options The options to fetch the item with.
* @returns The fetched item.
* @example items.fetch(item);
*/
fetch(listItem: string | ListItem, options?: FetchOptions): Promise<ListItem>;
/**
* Fetch items from the channel.
* @param options The options to fetch items with.
* @returns The fetched items.
* @example items.fetch();
*/
fetch(options?: FetchManyOptions): Promise<Collection<string, ListItem>>;
/** @ignore */
private fetchSingle;
/** @ignore */
private fetchMany;
/**
* Add a item to the list channel.
* @param message The message of the item.
* @param note The note of the item.
* @returns The added item.
* @example items.add('Hello World!');
*/
add(message: string, note?: string): Promise<ListItem>;
/**
* Edit a item in the list channel.
* @param listItem The item to edit.
* @param message The message of the item.
* @param note The note of the item.
* @returns The edited item.
* @example items.edit(item, 'Hello World!');
*/
edit(listItem: string | ListItem, message: string, note?: string): Promise<ListItem>;
/**
* Remove a item in the list channel.
* @param listItem The item to remove.
* @example items.remove(item);
*/
remove(listItem: string | ListItem): Promise<void>;
/**
* Complete a item in the list channel.
* @param listItem The item to complete.
* @example items.complete(item);
*/
complete(listItem: string | ListItem): Promise<void>;
/**
* Uncomplete a item in the list channel.
* @param listItem The item to uncomplete.
* @example items.uncomplete(item);
*/
uncomplete(listItem: string | ListItem): Promise<void>;
}
//# sourceMappingURL=ListItemManager.d.ts.map