Simp-O-Matic

Dumb Discord bot in TS.
git clone git://git.knutsen.co/Simp-O-Matic
Log | Files | Refs | README | LICENSE

commit b9d8b77f74e0689532497466d464d4b6a629a7c8
parent 9a837f212e3b3fbb0d88987b28e75445590ea154
Author: Demonstrandum <moi@knutsen.co>
Date:   Mon, 23 Mar 2020 13:31:07 +0000

Handle pastebin edits with more grace.

Diffstat:
Mlib/api/pastebin.ts | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/api/pastebin.ts b/lib/api/pastebin.ts @@ -22,9 +22,11 @@ export const pastebin_update = async (stringified : string) => { return await paste.edit(PASTE_ID, { contents: stringified - }, async (worked, _) => { + }, (worked, _) => { if (!worked) - return console.log('Error updating paste...'); + return Promise.reject('Error updating paste...'); + return Promise.resolve('Pastebin edit successful!'); }); }); + return Promise.resolve('Pastebin update successful'); };