Skip to content

Commit 60ec018

Browse files
latest
1 parent 1bf7f50 commit 60ec018

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

characters/neuronlink.character.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "NeuronLink",
33
"plugins": [],
4-
"clients": ["discord"],
4+
"clients": ["discord","telegram"],
55
"modelProvider": "ollama",
66
"settings": {
77
"secrets": {},
@@ -23,7 +23,7 @@
2323
"knowledge": [
2424
"Twitter: https://x.com/NeuronLinkAI",
2525
"Discord: https://discord.gg/neuronlink",
26-
"Telegram: https://t.me/NeuronLinkAI",
26+
"Telegram: https://t.me/Neuron_Link",
2727
"Website: https://neuronlink.ai"
2828
],
2929
"messageExamples": [

packages/client-discord/src/messageManager.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ import { DiscordUserClient } from './discordUserClient';
2323

2424
// Constants
2525
const MARKETING_CONSTANTS = {
26-
MIN_MARKETING_INTERVAL: 2 * 60 * 1000, // 2 minutes
27-
MAX_MARKETING_INTERVAL: 2 * 60 * 1000, // 2 minutes
28-
BASE_WAIT_TIME: 4 * 60 * 1000, // 4 minutes
29-
MIN_MESSAGES_BEFORE_REPLY: 2, // Reduced for testing
30-
TIME_REDUCTION_PER_MESSAGE: 1 * 60 * 1000, // 1 minute
31-
MIN_WAIT_TIME: 2 * 60 * 1000, // 2 minutes
32-
MAX_MARKETING_MESSAGES_PER_GROUP: 96
26+
MIN_MARKETING_INTERVAL: 6 * 60 * 60 * 1000, // 6 hours
27+
MAX_MARKETING_INTERVAL: 6 * 60 * 60 * 1000, // 6 hours
28+
BASE_WAIT_TIME: 6 * 60 * 60 * 1000, // 6 hours
29+
MIN_MESSAGES_BEFORE_REPLY: 2,
30+
TIME_REDUCTION_PER_MESSAGE: 30 * 60 * 1000, // 30 minutes
31+
MIN_WAIT_TIME: 4 * 60 * 60 * 1000, // 4 hours
32+
MAX_MARKETING_MESSAGES_PER_GROUP: 4 // 4 messages per day max (24/6)
3333
};
3434

3535
// Base templates that incorporate character's style and behavior
@@ -90,9 +90,9 @@ export class MessageManager {
9090
private lastMarketingTimes: Map<string, number> = new Map();
9191
private channelMessageCounts: Map<string, number> = new Map();
9292
private channelTimeReductions: Map<string, number> = new Map();
93-
private readonly MIN_MARKETING_INTERVAL = 2 * 60 * 1000; // 2 minutes
94-
private readonly MAX_MARKETING_INTERVAL = 2 * 60 * 1000; // 2 minutes
95-
private readonly MAX_MARKETING_MESSAGES_PER_CHANNEL = 96; // Max messages per channel per day
93+
private readonly MIN_MARKETING_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours
94+
private readonly MAX_MARKETING_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours
95+
private readonly MAX_MARKETING_MESSAGES_PER_CHANNEL = 4; // Max messages per channel per day
9696
private marketingEnabled: boolean = false;
9797

9898
constructor(runtime: IAgentRuntime, client: DiscordUserClient) {
@@ -579,7 +579,7 @@ export class MessageManager {
579579
private scheduleNextMarketingMessage(channelName: string): void {
580580
if (!this.marketingEnabled) return;
581581

582-
const interval = this.MIN_MARKETING_INTERVAL; // Use fixed 2-minute interval for testing
582+
const interval = this.MIN_MARKETING_INTERVAL; // Use fixed 6-hour interval
583583
elizaLogger.log(`Scheduling next marketing message for ${channelName} in ${Math.floor(interval/1000)} seconds`);
584584

585585
setTimeout(async () => {

packages/client-telegram/src/messageManager.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ export class MessageManager {
127127
private groupTimeReductions: Map<string, number> = new Map(); // Track accumulated time reductions
128128

129129
// Base timing constants
130-
private readonly MIN_MARKETING_INTERVAL = 2 * 60 * 1000; // 2 minutes
131-
private readonly MAX_MARKETING_INTERVAL = 2 * 60 * 1000; // 2 minutes
132-
private readonly BASE_WAIT_TIME = 4 * 60 * 1000; // 4 minutes
133-
private readonly MIN_MESSAGES_BEFORE_REPLY = 2; // Reduced for testing
134-
private readonly TIME_REDUCTION_PER_MESSAGE = 1 * 60 * 1000; // 1 minute
135-
private readonly MIN_WAIT_TIME = 2 * 60 * 1000; // 2 minutes
136-
private readonly MAX_MARKETING_MESSAGES_PER_GROUP = 96; // Max marketing messages per group per day
130+
private readonly MIN_MARKETING_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours
131+
private readonly MAX_MARKETING_INTERVAL = 6 * 60 * 60 * 1000; // 6 hours
132+
private readonly BASE_WAIT_TIME = 6 * 60 * 60 * 1000; // 6 hours
133+
private readonly MIN_MESSAGES_BEFORE_REPLY = 2;
134+
private readonly TIME_REDUCTION_PER_MESSAGE = 30 * 60 * 1000; // 30 minutes
135+
private readonly MIN_WAIT_TIME = 4 * 60 * 60 * 1000; // 4 hours
136+
private readonly MAX_MARKETING_MESSAGES_PER_GROUP = 4; // 4 messages per day max (24/6)
137137
private marketingEnabled: boolean = false;
138138

139139
constructor(runtime: IAgentRuntime, client: TelegramClient) {

0 commit comments

Comments
 (0)