oren — 6/17/2022, 2:20:30 PM

lets see, how many things have I coded for wasteof?

♥ 5 ↩ 0 💬 12 comments

comments

micahlt:

I’ve always thought that it’s weird that you’re Oren Lindsey and I’m Micah Lindley - gets very confusing

6/17/2022, 4:33:12 PM
oren:

Lolll

6/17/2022, 4:35:38 PM
silly:

Is wasteofbot a bot framework?

6/17/2022, 2:21:57 PM
oren:

no its a simple bot I made to test wasteof-client v3, it was running on @wasteof-client3

6/17/2022, 2:24:29 PM
silly:

Can I have some example wasteof-client code please? (Even the boilerplate cos I’m noob)

6/17/2022, 2:36:40 PM
oren:
import { Wasteof2Auth } from 'wasteof-client'
const wasteof = new Wasteof2Auth('username','password')
await wasteof.post('hello world', null)
6/17/2022, 3:11:04 PM
silly:
rpi@raspberrypi:~/Desktop $ node wasteof-funni.js 
(node:4778) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/home/rpi/Desktop/wasteof-funni.js:1
import { Wasteof2Auth } from 'wasteof-client'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
rpi@raspberrypi:~/Desktop $ 
6/17/2022, 4:43:00 PM
oren:

Put "type": "module" in your package.JSON

6/17/2022, 4:55:30 PM
silly:

What’s that

6/17/2022, 5:04:10 PM
oren:

There should be a package.JSON file in the same folder as index.js. If there is, add "type": "module" to it. If there isn't, create one and put in { "type": "module" }. Or, you can change the file extension from .js to .mjs i think

6/17/2022, 6:27:35 PM
silly:

I did the mjs thing and got a http error, I’ll have to show you Tomorrow though

6/17/2022, 8:17:47 PM
oren:

Ok

6/17/2022, 8:30:10 PM