Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #322 from OutiServer/develop
Browse files Browse the repository at this point in the history
Release 3.4.0
  • Loading branch information
KenCir authored Sep 28, 2022
2 parents d945263 + a8d8474 commit ddbd997
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "outiserverbot",
"version": "3.3.5",
"version": "3.4.0",
"engines": {
"node": "16.16.0"
},
Expand Down
9 changes: 8 additions & 1 deletion src/events/discord/messageCreate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { EmbedBuilder, MessageType } = require('discord.js');
const { EmbedBuilder, MessageType, AttachmentBuilder } = require('discord.js');
const { default: axios } = require('axios');
const url = require('url');

Expand All @@ -12,6 +12,13 @@ module.exports = async (client, message) => {
const translationText = await axios.get(`https://script.google.com/macros/s/AKfycbweJFfBqKUs5gGNnkV2xwTZtZPptI6ebEhcCU2_JvOmHwM2TCk/exec?text=${encodeURIComponent(message.content)}&source=en&target=ja`);
await message.reply(translationText.data);
}
else if (message.channelId === '1024474203312881684' && message.author.id !== client.user.id && message.attachments.size > 0) {
(await client.channels.cache.get('1024257455036829706').messages.fetch('1024475376858177681')).edit({
files: [
new AttachmentBuilder(message.attachments.first().url),
],
});
}
else if (message.type === MessageType.UserJoin && message.guildId === '706452606918066237') {
client.channels.cache.get('706459931351711775').send(`${message.author}さん、ようこそおうち鯖へ!\nまずは<#872501771254263829>を読みましょう。`);
}
Expand Down

0 comments on commit ddbd997

Please sign in to comment.