Closed ghost closed 3 years ago
![Uploading 1624991487758..jpg…]() (doesn't work)
I get this when i DM bot
Also permissions broken
I can't help you: your pic is broken. If you're not using repl.it, delete the replit.js file.
Also did you set correct role IDs?
Yes, everything correct. And i deleted that file
Do you have discord? Will be easier for me
ReferenceError: dbTable is not defined
at Client.
this error shows every time when user sent a message on a channel that is NOT a support channel
Edited: well technically, this issue can be fixed by moving the `const dbTable = new db.table("Tickets"); to something like this:
client.on('message', async message => {
const dbTable = new db.table('Tickets');
Well, move the const to the top of the client.on function like you did
Okay i will try.
But i also have
ReferenceError: text is not defined
What line?
Line 94 - client.channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`, {files: [message.attachments.first().url]})
Line 96 - if(e) client.guilds.cache.get(config.guild).channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`, {files: [message.attachments.first().url]})
Line 100 - client.channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`);
Line 102 - if(e) client.guilds.cache.get(config.guild).channels.cache.get(active.channelID).send(`${message.author.username} > ${text}`)
You didn't define text to anything, and therefore it's returning undefined.
And also, you defined msg to message content. Line 84 - var msg = message.content;
But it was never used. Maybe by changing ${text}
to ${msg}
?
Should be fixed now.
Hey so this isnt working too great. It doesnt start for me, even if I put everything in pls help
Error: Cannot find module './config.json' Require stack:
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.
Are you using replit?
Download the index.js and config.json files again
I am using replit. When I download all the files again it starts the process then dies immediately.
And I did everything that you told replit users to do. What files do I need to remove exactly?
What is your discord because the one on your website doesnt work
node v12.16.1
Replit: Updating package configuration
--> npm init -y Wrote to /home/runner/AE-Modmail/package.json:
{
"name": "AE-Modmail",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"chalk": "^4.1.1",
"cors": "^2.8.5",
"discord.js": "^12.5.3",
"discord.js-commando": "^0.12.3",
"express": "^4.17.1",
"helmet": "^4.6.0",
Server {
insecureHTTPParser: undefined,
_events: [Object: null prototype] {
request: [Function: app] EventEmitter {
_events: [Object: null prototype],
_eventsCount: 1,
_maxListeners: undefined,
setMaxListeners: [Function: setMaxListeners],
getMaxListeners: [Function: getMaxListeners],
emit: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
prependListener: [Function: prependListener],
once: [Function: once],
prependOnceListener: [Function: prependOnceListener],
removeListener: [Function: removeListener],
off: [Function: removeListener],
removeAllListeners: [Function: removeAllListeners],
listeners: [Function: listeners],
rawListeners: [Function: rawListeners],
listenerCount: [Function: listenerCount],
eventNames: [Function: eventNames],
init: [Function: init],
defaultConfiguration: [Function: defaultConfiguration],
lazyrouter: [Function: lazyrouter],
handle: [Function: handle],
use: [Function: use],
route: [Function: route],
engine: [Function: engine],
param: [Function: param],
set: [Function: set],
path: [Function: path],
enabled: [Function: enabled],
disabled: [Function: disabled],
enable: [Function: enable],
disable: [Function: disable],
acl: [Function],
bind: [Function],
checkout: [Function],
connect: [Function],
copy: [Function],
delete: [Function],
get: [Function],
head: [Function],
link: [Function],
lock: [Function],
'm-search': [Function],
merge: [Function],
mkactivity: [Function],
mkcalendar: [Function],
mkcol: [Function],
move: [Function],
notify: [Function],
options: [Function],
patch: [Function],
post: [Function],
pri: [Function],
propfind: [Function],
proppatch: [Function],
purge: [Function],
put: [Function],
rebind: [Function],
report: [Function],
search: [Function],
source: [Function],
subscribe: [Function],
trace: [Function],
unbind: [Function],
unlink: [Function],
unlock: [Function],
unsubscribe: [Function],
all: [Function: all],
del: [Function],
render: [Function: render],
listen: [Function: listen],
request: [IncomingMessage],
response: [ServerResponse],
cache: {},
engines: {},
settings: [Object],
locals: [Object: null prototype],
mountpath: '/',
_router: [Function]
},
connection: [Function: connectionListener],
listening: [Function: bound onceWrapper] { listener: [Function] }
},
_eventsCount: 3,
_maxListeners: undefined,
_connections: 0,
_handle: TCP {
reading: false,
onconnection: [Function: onconnection],
[Symbol(owner_symbol)]: [Circular]
},
_usingWorkers: false,
_workers: [],
_unref: false,
allowHalfOpen: true,
pauseOnConnect: false,
httpAllowHalfOpen: false,
Hint: hit control+c anytime to enter REPL.
Replit: Updating package configuration
--> npm init -y
Wrote to /home/runner/AE-Modmail/package.json:
{
"name": "AE-Modmail",
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.<anonymous> (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/AE-Modmail/index.js'
}```
this is the error I get when I run it
replace this
"main": "index.js",
with this
"main": "replit.js",
replace this
"main": "index.js",
with this"main": "replit.js",
Yeah I did that.
What's the output?
these are my files
I'll ask you to cancel these changes and rename replit.js
to index.js
file.
I'll ask you to cancel these changes and rename
replit.js
toindex.js
file.
internal/fs/utils.js:269 throw err; ^
Error: ENOENT: no such file or directory, open '/home/runner/AE-Modmail/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.
index.js doesn't exist on your side.
index.js doesn't exist on your side.
I renamed replit.js to index.js
In the package.json file, replace replit.js with index.js (there should be 2 occurences) and rename the main file to index.js.
This issue was marked as stale because it had no activity during the past 2 weeks. If this issue keeps being inactive, it will get closed in 3 days. Thanks for your contributions!
This issue was closed due to inactivity. Thanks for your contributions!
Hello the only thing that works is creating channel. The bot dont send user message, any command dont work (dbTable not found), if you dm multiple times it just keep create new ticket