Skip to content

Instantly share code, notes, and snippets.

@LA
LA / discord-transcript.ts
Created December 27, 2020 02:11
Discord Channel Transcript using REST API (NestJS)
async fetchMessages(channelId: string): Promise<string[]> {
let messages = [];
let beforeMessageId = '';
while (beforeMessageId !== null) {
const { data } = await this.httpService
.get(
`${API_URL}/channels/${channelId}/messages?limit=100${
beforeMessageId ? `&before=${beforeMessageId}` : ''
}`,
{
@LA
LA / zsh-prompt.txt
Created December 14, 2020 22:41
my zsh prompt
PROMPT='${ret_status} %{$fg[cyan]%}%~%{$reset_color%} $(git_prompt_info)'