Skip to content

Commit

Permalink
Hi
Browse files Browse the repository at this point in the history
  • Loading branch information
Replit user committed Oct 17, 2022
1 parent 0f53122 commit 4cb21f2
Show file tree
Hide file tree
Showing 3,764 changed files with 994,824 additions and 21 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
77 changes: 77 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@

hidden = [".config"]
run = "npm run start"

[[hints]]
regex = "Error \\[ERR_REQUIRE_ESM\\]"
message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)"

[nix]
channel = "stable-22_05"

[env]
XDG_CONFIG_HOME = "/home/runner/.config"
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"

[gitHubImport]
requiredFiles = [".replit", "replit.nix", ".config"]

[packager]
language = "nodejs"

[packager.features]
packageSearch = true
guessImports = true
enabledForHosting = false

[unitTest]
language = "nodejs"

[debugger]
support = true

[debugger.interactive]
transport = "localhost:0"
startCommand = [ "dap-node" ]

[debugger.interactive.initializeMessage]
command = "initialize"
type = "request"

[debugger.interactive.initializeMessage.arguments]
clientID = "replit"
clientName = "replit.com"
columnsStartAt1 = true
linesStartAt1 = true
locale = "en-us"
pathFormat = "path"
supportsInvalidatedEvent = true
supportsProgressReporting = true
supportsRunInTerminalRequest = true
supportsVariablePaging = true
supportsVariableType = true

[debugger.interactive.launchMessage]
command = "launch"
type = "request"

[debugger.interactive.launchMessage.arguments]
args = []
console = "externalTerminal"
cwd = "."
environment = []
pauseForSourceMap = false
program = "./index.js"
request = "launch"
sourceMaps = true
stopOnEntry = false
type = "pwa-node"

[languages]

[languages.javascript]
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"

[languages.javascript.languageServer]
start = "typescript-language-server --stdio"
2 changes: 1 addition & 1 deletion Database/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function connect() {
mongoose.connect(process.env.mongo, {
useNewUrlParser: true,
useUnifiedTopology: true,
});
}).catch(e => console.log('No Database added'));

mongoose.connection.once("open", () => {
console.log('[DATABASE] Connected To Database')
Expand Down
2 changes: 1 addition & 1 deletion Events/Guild/messageCreate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//--==--==--==--==--==--==--==
// PREFIX
const Prefix = '!'
const Prefix = '+'
//--==--==--==--==--==--==--==
const client = require('../../index.js');
const {EmbedBuilder,Collection, PermissionsBitField } = require(`discord.js`);
Expand Down
22 changes: 3 additions & 19 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const client = new Client({
Partials.User
],
presence: {
activities: [{name: `with You`, type: 0}],
activities: [{name: `Rezx. v2`, type: 0}],
status: "online" //online/idle/dnd
}
});
Expand Down Expand Up @@ -69,27 +69,11 @@ client.events = new Collection();
});

// Crash - Prevention
process.on('unhandledRejection', (err, cause) => {
let errorembeed = new EmbedBuilder()
.setTitle(`Error Caught!`)
.setDescription(`\`\`\`js\n${err}\`\`\``)
.setColor('Random')
client.fetchWebhook('id','token')
.catch((e) => console.log(`[Crash Prevention] Webook ID and TOKEN is not provided.`))
.then(a => a.send({embeds: [errorembeed]}));

console.log(`[Uncaught Exception]: ${err}`.bold.brightGreen);
process.on('unhandledRejection', (err, cause) => {
console.log(`[Uncaught Exception]: ${err}`.bold.brightGreen);
});

process.on('uncaughtException', err => {
let errorembeed = new EmbedBuilder()
.setTitle(`Exception Caught!`)
.setDescription(`\`\`\`js\n${err}\`\`\``)
.setColor('Random')
client.fetchWebhook('id','token')
.catch((e) => console.log(`[Crash Prevention] Webook ID and TOKEN is not provided.`))
.then(a => a.send({embeds:[errorembeed]}));

console.log(`[Uncaught Exception] ${err.message}`.bold.brightGreen)
});

Expand Down
1 change: 1 addition & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4cb21f2

Please sign in to comment.