-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from minesa-hub:new
An huge update for O-codex.
- Loading branch information
Showing
40 changed files
with
1,232 additions
and
1,714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,7 @@ config.js | |
json.sqlite | ||
|
||
# VSCode | ||
.vscode | ||
.vscode | ||
|
||
# Environment variables | ||
.env |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
{ | ||
"name": "o-codex", | ||
"version": "1.2.0", | ||
"description": "Minesa Hub's Bot", | ||
"version": "2.0.0", | ||
"description": "A Discord bot is doing unique things.", | ||
"main": "index.js", | ||
"type": "module", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"start": "node index.js" | ||
"start": "node src/index.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/minesa-hub/Neobot.git" | ||
"url": "git+https://github.com/minesa-hub/O-codex.git" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/minesa-hub/Neobot/issues" | ||
"url": "https://github.com/minesa-hub/O-codex/issues" | ||
}, | ||
"homepage": "https://github.com/minesa-hub/Neobot#readme", | ||
"homepage": "https://github.com/minesa-hub/o-codex#readme", | ||
"dependencies": { | ||
"@iamtraction/google-translate": "^2.0.0", | ||
"colors": "^1.4.0", | ||
"discord.js": "^14.7.1", | ||
"erela.js": "^2.4.0", | ||
"node-fetch": "^3.2.10", | ||
"openai": "^3.1.0" | ||
"@iamtraction/google-translate": "^2.0.1", | ||
"chalk": "^5.2.0", | ||
"discord.js": "^14.9.0", | ||
"dotenv": "^16.0.3", | ||
"mongoose": "^7.0.4" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { | ||
ContextMenuCommandBuilder, | ||
ApplicationCommandType, | ||
EmbedBuilder, | ||
ButtonBuilder, | ||
ButtonStyle, | ||
ActionRowBuilder, | ||
} from 'discord.js'; | ||
|
||
export default { | ||
data: new ContextMenuCommandBuilder() | ||
.setName('User Avatar') | ||
.setNameLocalizations({ | ||
ChineseCN: '用户头像', | ||
it: 'Avatar Utente', | ||
tr: 'Kullanıcı Avatarı-', | ||
}) | ||
.setType(ApplicationCommandType.User), | ||
execute: async ({ interaction }) => { | ||
await interaction.deferReply({ ephemeral: true }); | ||
|
||
const target = interaction.guild.members.cache.get(interaction.targetId); | ||
const avatar = target.user.displayAvatarURL({ dynamic: true, size: 4096 }); | ||
|
||
const embed = new EmbedBuilder() | ||
.setTitle(`${target.user.tag}'s Avatar`) | ||
.setImage(avatar) | ||
.setColor(0x1e1e1e); | ||
|
||
await interaction.editReply({ | ||
embeds: [embed], | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { ContextMenuCommandBuilder, ApplicationCommandType, EmbedBuilder } from 'discord.js'; | ||
|
||
export default { | ||
data: new ContextMenuCommandBuilder() | ||
.setName('User Banner') | ||
.setNameLocalizations({ | ||
ChineseCN: '用户横幅', | ||
it: 'Banner Utente', | ||
tr: 'Kullanıcı Afişi', | ||
}) | ||
.setType(ApplicationCommandType.User), | ||
execute: async ({ interaction, client }) => { | ||
await interaction.deferReply({ ephemeral: true }); | ||
|
||
const user = client.users.fetch(interaction.targetId, { force: true }); | ||
|
||
user.then(async (resolved) => { | ||
const imageURI = resolved.bannerURL({ dynamic: true, size: 4096 }); | ||
const embed = new EmbedBuilder() | ||
.setTitle(`${resolved.tag}'s Banner`) | ||
.setImage(imageURI) | ||
.setColor(0x1e1e1e); | ||
|
||
if (imageURI === null) { | ||
await interaction.editReply({ | ||
content: 'User has no banner set.', | ||
ephemeral: true, | ||
}); | ||
} else { | ||
await interaction.editReply({ embeds: [embed] }); | ||
} | ||
}); | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.